com.atlassian.bitbucket.scm.pull.ScmPullRequestCommandFactory |
Class Overview
Creates commands
which provide pull request functionality. Each method accepts a set of
CommandParameters
which are used to control the command's behaviour and output.
Plugin developers: This is probably not the interface you want to use. PullRequestService
automatically chooses the correct SCM based on the repository, and provides a more stable, compatible API. The
documentation for each method on this interface includes a link to the API service method or methods which expose it.
Public Methods
@Nonnull
public
Command<Boolean>
canMerge
()
Returns
- a command which, when executed, will return
true
if the pull request can be merged
cleanly by the SCM or false
if there are conflicts or other SCM-specific issues which prevent the
SCM from merging it
Parameters
parameters
| parameters describing how many changes to stream, and potentially for which paths |
callback
| a callback to receive changes |
Returns
- a command which, when executed, will stream the changes the pull request wants to apply
Parameters
callback
| a callback to receive commits |
Returns
- a command which, when executed, will stream the commits that are reachable from the
from ref
and not
reachable from the to ref
Parameters
parameters
| parameters describing the paths to diff and what should be included in the diffs generated |
callback
| a callback to receive the diff |
Returns
- a command which, when executed, will stream the diff for the specified paths
Retrieves the effective diff for the pull request. The "effective diff" is comprised of the two commits that
should be compared to get a view of what changes the pull request includes. When new commits are added to
either of the branches involved in a pull request, the pull request's effective diff may change.
Note: This method is not exposed via the service API. It is only available directly on the SCM API.
The effective diff is something plugin developers generally do not need to be explicitly aware of. Instead,
the commits
, changes(PullRequestChangeCommandParameters, ChangeCallback)
and diff(PullRequestDiffCommandParameters, DiffContentCallback)
should be retrieved using
their commands.
Returns
- a command which, when executed, will retrieve the
commit IDs
which describe the pull request's current effective diff
Parameters
parameters
| parameters describing additional context which an SCM may consider when merging the
pull request, potentially altering the way final shape of the merge |
Returns
- a command which, when executed, will merge the pull request, applying its changes to the target branch