Interface MergeQueueCheckResult

All Known Implementing Classes:
SimpleMergeQueueCheckResult

public interface MergeQueueCheckResult
The result of a MergeQueueCheck run, deciding whether the pull request can merge, should wait for a future a processing cycle, or be removed from the merge queue.

Each result contains a state indicating the outcome, with an optional reason and details URL.

All merge queue checks must finish with state ACCEPTED before a pull request can merge. A single PENDING/REJECTED state will cause the pull request to wait or be removed from the queue.

Since:
10.2
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    A 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.
    A state to control whether the pull request can merge, should wait, or be removed from the merge queue.
  • Method Details

    • getDetailsUrl

      @Nonnull Optional<String> getDetailsUrl()
      A URL displayed in the UI, linking to external systems (such as CI build pages) for more information.
      Returns:
      a URL or Optional.empty() if no URL is available
    • getReason

      @Nonnull Optional<com.atlassian.bitbucket.i18n.I18nKey> getReason()
      A reason for the result, displayed in the UI. Especially important for REJECTED and PENDING states, 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.
      Returns:
      an I18nKey containing the i18n message key and arguments, or Optional.empty()
    • getState

      @Nonnull MergeQueueCheckResult.State getState()
      A state to control whether the pull request can merge, should wait, or be removed from the merge queue.
      Returns:
      the state of the check result