Package com.atlassian.bitbucket.scm.pull
Interface MergeRequest
public interface MergeRequest
Represents a request to merge a pull request, intended to allow
RepositoryMergeCheck
s to validate the
intended merge and, potentially, veto(java.lang.String, java.lang.String)
it.- See Also:
-
MergeRequestCheckService
PullRequestMergeRequest
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the proposed commit message, if one was provided.com.atlassian.bitbucket.pull.PullRequest
boolean
isDryRun()
Retrieves a flag indicating whether this request is for acanMerge
check or a realmerge
.boolean
isVetoed()
void
If 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
null
forcanMerge
checks and may benull
formerge
requests
-
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 acanMerge
check or a realmerge
.This flag is intended to allow
RepositoryMergeCheck
s to apply different validation, if necessary, betweencanMerge
andmerge
requests. For example, aRepositoryMergeCheck
to validate thecommit message
would not be applied on a dry run, because the commit message is only supplied when the merge is actually performed.- Returns:
true
if this is acanMerge
check; otherwise,false
if it is amerge
request
-
isVetoed
boolean isVetoed()- Returns:
true
if a previousRepositoryMergeCheck
has alreadyvetoed
the 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
-