public interface ChangeHooks
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener,
IdentifiedUser user) |
void |
doChangeAbandonedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account account,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
String reason,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Change Abandoned Hook.
|
void |
doChangeMergedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account account,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Change Merged Hook.
|
void |
doChangeRestoredHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account account,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
String reason,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Change Restored Hook.
|
void |
doClaSignupHook(com.google.gerrit.reviewdb.client.Account account,
com.google.gerrit.common.data.ContributorAgreement cla) |
void |
doCommentAddedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account account,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
String comment,
Map<String,Short> approvals,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Comment Added Hook.
|
void |
doDraftPublishedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Draft Published Hook.
|
void |
doMergeFailedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account account,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
String reason,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Merge Failed Hook.
|
void |
doPatchsetCreatedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Patchset Created Hook.
|
void |
doRefUpdatedHook(com.google.gerrit.reviewdb.client.Branch.NameKey refName,
org.eclipse.jgit.lib.ObjectId oldId,
org.eclipse.jgit.lib.ObjectId newId,
com.google.gerrit.reviewdb.client.Account account)
Fire the Ref Updated Hook
|
void |
doRefUpdatedHook(com.google.gerrit.reviewdb.client.Branch.NameKey refName,
org.eclipse.jgit.lib.RefUpdate refUpdate,
com.google.gerrit.reviewdb.client.Account account)
Fire the Ref Updated Hook
|
ChangeHookRunner.HookResult |
doRefUpdateHook(com.google.gerrit.reviewdb.client.Project project,
String refName,
com.google.gerrit.reviewdb.client.Account uploader,
org.eclipse.jgit.lib.ObjectId oldId,
org.eclipse.jgit.lib.ObjectId newId)
Fire the Ref update Hook
|
void |
doReviewerAddedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account account,
com.google.gerrit.reviewdb.client.PatchSet patchSet,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Reviewer Added Hook
|
void |
doTopicChangedHook(com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.Account account,
String oldTopic,
com.google.gerrit.reviewdb.server.ReviewDb db)
Fire the Topic Changed Hook
|
void |
postEvent(com.google.gerrit.reviewdb.client.Branch.NameKey branchName,
ChangeEvent event)
Post a stream event that is related to a branch
|
void |
postEvent(com.google.gerrit.reviewdb.client.Change change,
ChangeEvent event,
com.google.gerrit.reviewdb.server.ReviewDb db)
Post a stream event that is related to a change
|
void |
removeChangeListener(ChangeListener listener) |
void addChangeListener(ChangeListener listener, IdentifiedUser user)
void removeChangeListener(ChangeListener listener)
void doPatchsetCreatedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.PatchSet patchSet, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.patchSet
- The Patchset that was created.com.google.gwtorm.server.OrmException
void doDraftPublishedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.PatchSet patchSet, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.patchSet
- The Patchset that was published.com.google.gwtorm.server.OrmException
void doCommentAddedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account account, com.google.gerrit.reviewdb.client.PatchSet patchSet, String comment, Map<String,Short> approvals, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.patchSet
- The patchset this comment is related to.account
- The gerrit user who added the comment.comment
- The comment given.approvals
- Map of label IDs to scorescom.google.gwtorm.server.OrmException
void doChangeMergedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account account, com.google.gerrit.reviewdb.client.PatchSet patchSet, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.account
- The gerrit user who submitted the change.patchSet
- The patchset that was merged.com.google.gwtorm.server.OrmException
void doMergeFailedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account account, com.google.gerrit.reviewdb.client.PatchSet patchSet, String reason, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.account
- The gerrit user who attempted to submit the change.patchSet
- The patchset that failed to merge.reason
- The reason that the change failed to merge.com.google.gwtorm.server.OrmException
void doChangeAbandonedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account account, com.google.gerrit.reviewdb.client.PatchSet patchSet, String reason, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.account
- The gerrit user who abandoned the change.reason
- Reason for abandoning the change.com.google.gwtorm.server.OrmException
void doChangeRestoredHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account account, com.google.gerrit.reviewdb.client.PatchSet patchSet, String reason, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.account
- The gerrit user who restored the change.reason
- Reason for restoring the change.com.google.gwtorm.server.OrmException
void doRefUpdatedHook(com.google.gerrit.reviewdb.client.Branch.NameKey refName, org.eclipse.jgit.lib.RefUpdate refUpdate, com.google.gerrit.reviewdb.client.Account account)
refName
- The updated project and branch.refUpdate
- An actual RefUpdate objectaccount
- The gerrit user who moved the refvoid doRefUpdatedHook(com.google.gerrit.reviewdb.client.Branch.NameKey refName, org.eclipse.jgit.lib.ObjectId oldId, org.eclipse.jgit.lib.ObjectId newId, com.google.gerrit.reviewdb.client.Account account)
refName
- The Branch.NameKey of the ref that was updatedoldId
- The ref's old idnewId
- The ref's new idaccount
- The gerrit user who moved the refvoid doReviewerAddedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account account, com.google.gerrit.reviewdb.client.PatchSet patchSet, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.patchSet
- The patchset that the reviewer was added on.account
- The gerrit user who was added as reviewer.com.google.gwtorm.server.OrmException
void doTopicChangedHook(com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.Account account, String oldTopic, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change itself.account
- The gerrit user who changed the topic.oldTopic
- The old topic name.com.google.gwtorm.server.OrmException
void doClaSignupHook(com.google.gerrit.reviewdb.client.Account account, com.google.gerrit.common.data.ContributorAgreement cla)
ChangeHookRunner.HookResult doRefUpdateHook(com.google.gerrit.reviewdb.client.Project project, String refName, com.google.gerrit.reviewdb.client.Account uploader, org.eclipse.jgit.lib.ObjectId oldId, org.eclipse.jgit.lib.ObjectId newId)
project
- The target projectrefName
- The Branch.NameKey of the ref provided by clientuploader
- The gerrit user running the commandoldId
- The ref's old idnewId
- The ref's new idvoid postEvent(com.google.gerrit.reviewdb.client.Change change, ChangeEvent event, com.google.gerrit.reviewdb.server.ReviewDb db) throws com.google.gwtorm.server.OrmException
change
- The change that the event is related toevent
- The event to postdb
- The databasecom.google.gwtorm.server.OrmException
void postEvent(com.google.gerrit.reviewdb.client.Branch.NameKey branchName, ChangeEvent event)
branchName
- The branch that the event is related toevent
- The event to post