public interface

PluginPullRequestCommandFactory

com.atlassian.bitbucket.scm.pull.PluginPullRequestCommandFactory

Summary

Public Methods
@Nonnull Command<Void> bulkRescope(BulkRescopeCommandParameters parameters)
@Deprecated @Nonnull Command<Void> changes(PullRequest pullRequest, PullRequestChangeCommandParameters parameters, ChangeCallback callback)
This method is deprecated. in 6.0 for removal in 7.0. Use changes(PullRequest, PullRequestChangesCommandParameters, ChangeCallback) instead.
@Nonnull Command<Void> changes(PullRequest pullRequest, PullRequestChangesCommandParameters parameters, ChangeCallback callback)
@Nonnull Command<Void> commits(PullRequest pullRequest, PullRequestCommitsCommandParameters parameters, CommitCallback callback)
@Deprecated @Nonnull Command<Void> commits(PullRequest pullRequest, CommitCallback callback)
This method is deprecated. in 6.0 for removal in 7.0. Use commits(PullRequest, PullRequestCommitsCommandParameters, CommitCallback) instead.
@Nonnull Command<Void> delete(PullRequest pullRequest, PullRequestDeleteCommandParameters parameters)
Deletes repository data associated with the specified pull request.
@Nonnull Command<Void> diff(PullRequest pullRequest, PullRequestDiffCommandParameters parameters, DiffContentCallback callback)
@Nonnull Command<PullRequestEffectiveDiff> effectiveDiff(PullRequest pullRequest)
@Nonnull Command<Branch> merge(PullRequest pullRequest, PullRequestMergeCommandParameters parameters)
@Nonnull Command<PullRequestMergeResult> tryMerge(PullRequest pullRequest)
Attempt to merge the pull request to determine what the expected result of actually merging it would be.

Public Methods

@Nonnull public Command<Void> bulkRescope (BulkRescopeCommandParameters parameters)

Parameters
parameters describes the repository and provides a context for the command to use to retrieve affected rescopes and apply updates
Returns
  • a command which, when called, will analyse any rescopes from the provided context

@Deprecated @Nonnull public Command<Void> changes (PullRequest pullRequest, PullRequestChangeCommandParameters parameters, ChangeCallback callback)

This method is deprecated.
in 6.0 for removal in 7.0. Use changes(PullRequest, PullRequestChangesCommandParameters, ChangeCallback) instead.

Parameters
pullRequest the pull request to stream changes for
parameters parameters describing the changes to stream
callback a callback to receive changes
Returns
  • a command which, when called, will stream changes for the specified pull request

@Nonnull public Command<Void> changes (PullRequest pullRequest, PullRequestChangesCommandParameters parameters, ChangeCallback callback)

Parameters
pullRequest the pull request to stream changes for
parameters parameters describing the changes to stream
callback a callback to receive changes
Returns
  • a command which, when called, will stream changes for the specified pull request

@Nonnull public Command<Void> commits (PullRequest pullRequest, PullRequestCommitsCommandParameters parameters, CommitCallback callback)

Parameters
pullRequest describes the refs being compared
callback a callback to receive commits which are unique to the from ref
Returns
  • a command which, when called, will stream commits referenced by the from ref which are not referenced by the to ref

@Deprecated @Nonnull public Command<Void> commits (PullRequest pullRequest, CommitCallback callback)

This method is deprecated.
in 6.0 for removal in 7.0. Use commits(PullRequest, PullRequestCommitsCommandParameters, CommitCallback) instead.

Parameters
pullRequest describes the refs being compared
callback a callback to receive commits which are unique to the from ref
Returns
  • a command which, when called, will stream commits referenced by the from ref which are not referenced by the to ref

@Nonnull public Command<Void> delete (PullRequest pullRequest, PullRequestDeleteCommandParameters parameters)

Deletes repository data associated with the specified pull request.

SCMs must not delete the from or to refs. This command is intended to delete any internal, SCM-specific data the SCM tracks for pull requests. For example, if an SCM maintains additional commits or merges, or cached data such as change, diff or conflict details used to speed up other operations, or extra refs used to allow that data to be fetched, those are the types of data implementations of this command should remove.

Even if an SCM does not track any additional data beyond the refs involved in the pull request, the returned Command must be non-null. Such SCMs may wish to leverage the default implementation, which returns a command that does nothing when called.

Parameters
pullRequest the pull request to delete
parameters parameters providing context for the deleted pull request
Returns
  • a command which, when called, will delete the specified pull request, releasing any artifacts, such as refs or objects, that are associated with it

@Nonnull public Command<Void> diff (PullRequest pullRequest, PullRequestDiffCommandParameters parameters, DiffContentCallback callback)

@Nonnull public Command<PullRequestEffectiveDiff> effectiveDiff (PullRequest pullRequest)

@Nonnull public Command<Branch> merge (PullRequest pullRequest, PullRequestMergeCommandParameters parameters)

@Nonnull public Command<PullRequestMergeResult> tryMerge (PullRequest pullRequest)

Attempt to merge the pull request to determine what the expected result of actually merging it would be. SCMs are not required to actually attempt the merge. Instead a result with UNKNOWN outcome may be used to indicated that the merge was not attempted or some unexpected error occurred while attempting the merge.

Parameters
pullRequest the pull request for which a dry run merge should be performed
Returns
  • a command which, when called, will return the result of attempting to merge the pull request