Package com.atlassian.bitbucket.scm.pull
Interface MergeRequest
public interface MergeRequest
Represents a request to merge a pull request, intended to allow
RepositoryMergeChecks to validate the
intended merge and, potentially, veto(java.lang.String, java.lang.String) it.- See Also:
-
MergeRequestCheckServicePullRequestMergeRequest
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the proposed commit message, if one was provided.com.atlassian.bitbucket.pull.PullRequestbooleanisDryRun()Retrieves a flag indicating whether this request is for acanMergecheck or a realmerge.booleanisVetoed()voidIf called, signifies that the calling check wishes to veto the merge.
-
Method Details
-
getMessage
Retrieves the proposed commit message, if one was provided.On
dry runs, the commit message will always benull.- Returns:
- the proposed commit message, which will be
nullforcanMergechecks and may benullformergerequests
-
getPullRequest
@Nonnull com.atlassian.bitbucket.pull.PullRequest getPullRequest()- Returns:
- the pull request to be merged
-
isDryRun
boolean isDryRun()Retrieves a flag indicating whether this request is for acanMergecheck or a realmerge.This flag is intended to allow
RepositoryMergeChecks to apply different validation, if necessary, betweencanMergeandmergerequests. For example, aRepositoryMergeCheckto validate thecommit messagewould not be applied on a dry run, because the commit message is only supplied when the merge is actually performed.- Returns:
trueif this is acanMergecheck; otherwise,falseif it is amergerequest
-
isVetoed
boolean isVetoed()- Returns:
trueif a previousRepositoryMergeCheckhas alreadyvetoedthe merge; otherwise,false
-
veto
If called, signifies that the calling check wishes to veto the merge.- Parameters:
summaryMessage- a simple summary of why the merge is being vetoeddetailedMessage- a detailed explanation of why the merge is being vetoed
-