public interface

PullRequestSupplier

com.atlassian.bitbucket.pull.PullRequestSupplier
Known Indirect Subclasses

Class Overview

Allows retrieving pull requests by their target repository and ID.

This is a simplification of the PullRequestService, intended to be used in cases where a component needs to be able to look up pull requests but doesn't need the full service functionality. Using this interface instead makes such components easier to test. Plugin developers: Plugins cannot autowire their components when importing both pullRequestSupplier and PullRequestService. In general, if a plugin needs PullRequestService methods, it should only use the PullRequestService. This interface should be used when a plugin only needs to retrieve pull requests.

Summary

Public Methods
@Nullable PullRequest getById(int repositoryId, long pullRequestId)
Retrieves a pull request by its ID, within the specified repository.

Public Methods

@Nullable public PullRequest getById (int repositoryId, long pullRequestId)

Retrieves a pull request by its ID, within the specified repository.

Parameters
repositoryId the ID of the repository to which the pull request will be merged
pullRequestId the ID of the pull request within the repository
Returns
  • the pull request found or null if there is no pull request that matches the given id