Class MergeQueueBranchPreparedEvent

java.lang.Object
java.util.EventObject
com.atlassian.bitbucket.event.ApplicationEvent
com.atlassian.bitbucket.event.repository.RepositoryEvent
com.atlassian.bitbucket.event.repository.AbstractRepositoryRefsChangedEvent
com.atlassian.bitbucket.event.branch.BranchChangedEvent
com.atlassian.bitbucket.event.branch.BranchCreatedEvent
com.atlassian.bitbucket.pull.mergequeue.MergeQueueBranchPreparedEvent
All Implemented Interfaces:
com.atlassian.bitbucket.event.repository.RepositoryRefsChangedEvent, Serializable

public class MergeQueueBranchPreparedEvent extends com.atlassian.bitbucket.event.branch.BranchCreatedEvent
An event that is raised when a merge queue branch is created (or recalculated) for a pull request.

Listeners can use this event to react when a merge queue branch is prepared, for example to trigger external build systems or record audit information specific to merge queue processing. The prepared merge commit may be recalculated (if a pull request is ejected from the queue) so the event can be published more than once per pull request.

The branch may be short-lived and is typically deleted after the pull request leaves the merge queue.

Since:
10.2
See Also:
  • Field Summary

    Fields inherited from class com.atlassian.bitbucket.event.branch.BranchChangedEvent

    branch

    Fields inherited from class com.atlassian.bitbucket.event.repository.AbstractRepositoryRefsChangedEvent

    EMPTY_HASH

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    MergeQueueBranchPreparedEvent(Object source, com.atlassian.bitbucket.repository.Repository repository, com.atlassian.bitbucket.repository.Branch branch, com.atlassian.bitbucket.pull.PullRequest pullRequest)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the ID of the prepared merge commit, that represents the result of merging the pull request into the target branch.
    com.atlassian.bitbucket.pull.PullRequest
     

    Methods inherited from class com.atlassian.bitbucket.event.branch.BranchChangedEvent

    getBranch

    Methods inherited from class com.atlassian.bitbucket.event.repository.AbstractRepositoryRefsChangedEvent

    getRefChanges

    Methods inherited from class com.atlassian.bitbucket.event.repository.RepositoryEvent

    getRepository

    Methods inherited from class com.atlassian.bitbucket.event.ApplicationEvent

    getDate, getUser

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.atlassian.bitbucket.event.repository.RepositoryRefsChangedEvent

    getRepository, getUser
  • Constructor Details

    • MergeQueueBranchPreparedEvent

      public MergeQueueBranchPreparedEvent(@Nonnull Object source, @Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.repository.Branch branch, @Nonnull com.atlassian.bitbucket.pull.PullRequest pullRequest)
  • Method Details

    • getPreparedMergeCommit

      @Nonnull public String getPreparedMergeCommit()
      Returns the ID of the prepared merge commit, that represents the result of merging the pull request into the target branch.
    • getPullRequest

      @Nonnull public com.atlassian.bitbucket.pull.PullRequest getPullRequest()