Class SimpleMergeQueueCheckResult
java.lang.Object
com.atlassian.bitbucket.pull.mergequeue.SimpleMergeQueueCheckResult
- All Implemented Interfaces:
MergeQueueCheckResult
A simple, immutable implementation of
MergeQueueCheckResult.
// Accepted result
MergeQueueCheckResult accepted = new SimpleMergeQueueCheckResult.Builder(State.ACCEPTED)
.build();
// Pending result with a reason and details URL
MergeQueueCheckResult pending = new SimpleMergeQueueCheckResult.Builder(State.PENDING)
.reason(new I18nKey("plugin.queue.check.build.inprogress", buildName))
.detailsUrl("https://ci.example.com/build/123")
.build();
// Rejected result with a reason and details URL
MergeQueueCheckResult rejected = new SimpleMergeQueueCheckResult.Builder(State.REJECTED)
.reason(new I18nKey("plugin.queue.check.build.failed", buildName))
.detailsUrl(buildUrl)
.build();
- Since:
- 10.2
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.atlassian.bitbucket.pull.mergequeue.MergeQueueCheckResult
MergeQueueCheckResult.State -
Method Summary
Modifier and TypeMethodDescriptionA URL displayed in the UI, linking to external systems (such as CI build pages) for more information.Optional<com.atlassian.bitbucket.i18n.I18nKey> A reason for the result, displayed in the UI.getState()A state to control whether the pull request can merge, should wait, or be removed from the merge queue.
-
Method Details
-
getDetailsUrl
Description copied from interface:MergeQueueCheckResultA URL displayed in the UI, linking to external systems (such as CI build pages) for more information.- Specified by:
getDetailsUrlin interfaceMergeQueueCheckResult- Returns:
- a URL or
Optional.empty()if no URL is available
-
getReason
Description copied from interface:MergeQueueCheckResultA reason for the result, displayed in the UI. Especially important forREJECTEDandPENDINGstates, where users need to understand why their pull request is still waiting / was removed from the queue. A default message may be used if none is provided.- Specified by:
getReasonin interfaceMergeQueueCheckResult- Returns:
- an
I18nKeycontaining the i18n message key and arguments, orOptional.empty()
-
getState
Description copied from interface:MergeQueueCheckResultA state to control whether the pull request can merge, should wait, or be removed from the merge queue.- Specified by:
getStatein interfaceMergeQueueCheckResult- Returns:
- the state of the check result
-