public interface MergeRequest
RepositoryMergeChecks to validate the
intended merge and, potentially, veto(java.lang.String, java.lang.String) it.MergeRequestCheckService,
PullRequestMergeRequest| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getContext()
Retrieves any additional context that was supplied when the merge was requested.
|
String |
getMessage()
Retrieves the proposed commit message, if one was provided.
|
com.atlassian.bitbucket.pull.PullRequest |
getPullRequest() |
boolean |
isDryRun()
Retrieves a flag indicating whether this request is for a
canMerge check
or a real merge. |
boolean |
isVetoed() |
void |
veto(String summaryMessage,
String detailedMessage)
If called, signifies that the calling check wishes to veto the merge.
|
@Nonnull Map<String,Object> getContext()
On dry runs, the context will always be empty.
@Nullable String getMessage()
On dry runs, the commit message will always be null.
null for canMerge
checks and may be null for merge requests@Nonnull com.atlassian.bitbucket.pull.PullRequest getPullRequest()
boolean isDryRun()
canMerge check
or a real merge.
This flag is intended to allow RepositoryMergeChecks to apply different validation, if necessary, between
canMerge and merge requests. For example, a RepositoryMergeCheck to validate the
commit message would not be applied on a dry run, because the commit message is only
supplied when the merge is actually performed.
true if this is a canMerge check; otherwise, false
if it is a merge requestboolean isVetoed()
true if a previous RepositoryMergeCheck has already vetoed the merge;
otherwise, falsevoid veto(@Nonnull String summaryMessage, @Nonnull String detailedMessage)
summaryMessage - a simple summary of why the merge is being vetoeddetailedMessage - a detailed explanation of why the merge is being vetoedCopyright © 2022 Atlassian. All rights reserved.