Class GitPullRequestRefsChangedEvent
java.lang.Object
java.util.EventObject
com.atlassian.bitbucket.event.ApplicationEvent
com.atlassian.bitbucket.scm.git.event.GitPullRequestRefsChangedEvent
- All Implemented Interfaces:
Serializable
@AsynchronousPreferred
public class GitPullRequestRefsChangedEvent
extends com.atlassian.bitbucket.event.ApplicationEvent
The Git plugin creates and maintains refs for each pull request. When a pull request is rescoped (either the 'from'
or the 'to' branch is updated) the pull request refs are not updated immediately. Often a merge operation will
need to be performed to determine the new diff. Merges can be slow and for this reason, pull requests refs are
updated asynchronously. When this happens a
GitPullRequestRefsChangedEvent is raised.- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionGitPullRequestRefsChangedEvent(Object source, com.atlassian.bitbucket.repository.Repository repository, long pullRequestId, com.atlassian.bitbucket.repository.RefChange fromRefChange, com.atlassian.bitbucket.repository.RefChange mergeRefChange) -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.bitbucket.repository.RefChangecom.atlassian.bitbucket.repository.RefChangelongcom.atlassian.bitbucket.repository.RepositorybooleanbooleanMethods inherited from class com.atlassian.bitbucket.event.ApplicationEvent
getDate, getUserMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
GitPullRequestRefsChangedEvent
public GitPullRequestRefsChangedEvent(@Nonnull Object source, @Nonnull com.atlassian.bitbucket.repository.Repository repository, long pullRequestId, @Nullable com.atlassian.bitbucket.repository.RefChange fromRefChange, @Nullable com.atlassian.bitbucket.repository.RefChange mergeRefChange) - Since:
- 9.0
-
-
Method Details
-
getFromRefChange
@Nullable public com.atlassian.bitbucket.repository.RefChange getFromRefChange()- Returns:
- the ref change describing how the
/pull-requests/id/fromref has changed.nullif the ref did not change
-
getMergeRefChange
@Nullable public com.atlassian.bitbucket.repository.RefChange getMergeRefChange()- Returns:
- the ref change describing how the
/pull-requests/id/mergeref has changed.nullif the ref did not change
-
getPullRequestId
public long getPullRequestId()- Returns:
- the ID of the pull request for which the ref(s) were updated
- Since:
- 9.0
-
getRepository
@Nonnull public com.atlassian.bitbucket.repository.Repository getRepository()- Returns:
- the target repository of the pull request
-
hasFromRefChanged
public boolean hasFromRefChanged()- Returns:
trueif the/pull-requests/id/fromref has changed
-
hasMergeRefChanged
public boolean hasMergeRefChanged()- Returns:
trueif the/pull-requests/id/mergeref has changed
-