public interface ScmPullRequestCommandFactory
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.
@Deprecated @Nonnull Command<Void> changes(@Nonnull PullRequestChangeCommandParameters parameters, @Nonnull ChangeCallback callback)
changes(PullRequestChangesCommandParameters, ChangeCallback)
instead.parameters
- parameters describing how many changes to stream, and potentially for which pathscallback
- a callback to receive changesPullRequestService.streamChanges(PullRequestChangesRequest, ChangeCallback)
@Nonnull Command<Void> changes(@Nonnull PullRequestChangesCommandParameters parameters, @Nonnull ChangeCallback callback)
parameters
- parameters describing how many changes to stream, and potentially for which pathscallback
- a callback to receive changesPullRequestService.streamChanges(PullRequestChangesRequest, ChangeCallback)
@Deprecated @Nonnull Command<Void> commits(@Nonnull CommitCallback callback)
commits(PullRequestCommitsCommandParameters, CommitCallback)
instead.callback
- a callback to receive commitsfrom ref
and not
reachable from the to ref
PullRequestService.streamCommits(PullRequestCommitsRequest, CommitCallback)
@Nonnull Command<Void> commits(@Nonnull PullRequestCommitsCommandParameters parameters, @Nonnull CommitCallback callback)
parameters
- parameters describing how the commits should be streamedcallback
- a callback to receive commitsfrom ref
and not
reachable from the to ref
PullRequestService.streamCommits(PullRequestCommitsRequest, CommitCallback)
@Nonnull Command<Void> diff(@Nonnull PullRequestDiffCommandParameters parameters, @Nonnull DiffContentCallback callback)
parameters
- parameters describing the paths to diff and what should be included in the diffs generatedcallback
- a callback to receive the diffPullRequestService.streamDiff(PullRequestDiffRequest, DiffContentCallback)
@Nonnull Command<PullRequestEffectiveDiff> effectiveDiff()
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
and diff(com.atlassian.bitbucket.scm.pull.PullRequestDiffCommandParameters, com.atlassian.bitbucket.content.DiffContentCallback)
should be
retrieved using their respective commands.
commit IDs
which describe the pull request's current effective diff@Nonnull Command<Branch> merge(@Nonnull PullRequestMergeCommandParameters parameters)
parameters
- parameters describing additional context which an SCM may consider when merging the
pull request, potentially altering the way final shape of the mergePullRequestService.merge(PullRequestMergeRequest)
@Nonnull Command<PullRequestMergeResult> tryMerge(@Nonnull PullRequest pullRequest)
pullRequest
- the pull request to test for merge-abilityPullRequestService.canMerge(int, long)
Copyright © 2019 Atlassian. All rights reserved.