Interface RepositoryRefsChangedEvent
- All Known Implementing Classes:
AbstractRepositoryRefsChangedEvent
,BranchChangedEvent
,BranchCreatedEvent
,BranchDeletedEvent
,FileEditedEvent
,PullRequestMergedEvent
,RepositoryPushEvent
,TagChangedEvent
,TagCreatedEvent
,TagDeletedEvent
public interface RepositoryRefsChangedEvent
Interface for events that are published when changes are made to a repository.
RepositoryRefsChangedEvent
listeners will be notified when any
sub-events are published. As a result, listening for this event is the
best way to be aware of repository changes.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a collection of thechanged refs
.Retrieves the repository in which refs were changed.getUser()
Retrieves the user who triggered the ref changes, if available.
-
Method Details
-
getRefChanges
Retrieves a collection of thechanged refs
.Note: While the returned collection will never be
null
, it may be empty. For example, aremotely merged pull request
will have an empty set of changes.- Returns:
- a collection containing 0 or more changed refs
-
getRepository
Retrieves the repository in which refs were changed. All of thechanged refs
for a single event will always be in the same repository.- Returns:
- the repository containing the changed refs
-
getUser
Retrieves the user who triggered the ref changes, if available.In most contexts, the user will be set. However, some changes may happen in contexts where no context user is available. For example, custom plugins may perform automated processing outside of a user context and raise change events based on the processing performed. Callers are encouraged to check for and handle the case where there is no user available.
- Returns:
- the triggering user, or
null
if the change happened due to background processing or in another context where no user is available
-