ssh -p <port> <host> gerrit stream-events
Provides a portal into the major events occurring on the server, outputting activity data in real-time to the client. Events are filtered by the caller’s access permissions, ensuring the caller only receives events for changes they can view on the web, or in the project repository.
Event output is in JSON, one event per line.
Caller must be a member of the privileged Administrators group, or have been granted the Stream Events global capability.
This command is intended to be used in scripts.
$ ssh -p 29418 review.example.com gerrit stream-events {"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...} {"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
Only subscribe to specific event types:
$ ssh -p 29418 review.example.com gerrit stream-events \ -s patchset-created -s ref-replicated
The JSON messages consist of nested objects referencing the change, patchSet, account involved, and other attributes as appropriate.
Note that any field may be missing in the JSON messages, so consumers of this JSON stream should deal with that appropriately.
Sent when the assignee of a change has been modified.
type
“assignee-changed”
change
change attribute
changer
account attribute
oldAssignee
Assignee before it was changed.
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a change has been abandoned.
type
“change-abandoned”
change
change attribute
patchSet
patchSet attribute
abandoner
account attribute
reason
Reason for abandoning the change.
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a change has been merged into the git repository.
type
“change-merged”
change
change attribute
patchSet
patchSet attribute
submitter
account attribute
newRev
The resulting revision of the merge.
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when an abandoned change has been restored.
type
“change-restored”
change
change attribute
patchSet
patchSet attribute
restorer
account attribute
reason
Reason for restoring the change.
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a review comment has been posted on a change.
type
“comment-added”
change
change attribute
patchSet
patchSet attribute
author
account attribute
approvals
All approval attributes granted.
comment
Review comment cover message.
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent to notify a client that events have been dropped.
Sent when the hashtags have been added to or removed from a change.
type
“hashtags-changed”
change
change attribute
editor
account attribute
added
List of hashtags added to the change
removed
List of hashtags removed from the change
hashtags
List of hashtags on the change after tags were added or removed
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a new project has been created.
type
“project-created”
projectName
The created project name
projectHead
The created project head name
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a new change has been uploaded, or a new patch set has been uploaded to an existing change.
type
“patchset-created”
change
change attribute
patchSet
patchSet attribute
uploader
account attribute
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a reference is updated in a git repository.
type
“ref-updated”
submitter
account attribute
refUpdate
refUpdate attribute
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a reviewer is added to a change.
type
“reviewer-added”
change
change attribute
patchSet
patchSet attribute
reviewer
account attribute
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a reviewer (with a vote) is removed from a change.
type
“reviewer-deleted”
change
change attribute
patchSet
patchSet attribute
reviewer
reviewer that was removed as account attribute
remover
user that removed the reviewer as account attribute
approvals
All approval attributes removed.
comment
Review comment cover message.
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when the topic of a change has been changed.
type
“topic-changed”
change
change attribute
changer
account attribute
oldTopic
Topic name before it was changed.
eventCreatedOn
Time in seconds since the UNIX epoch when this event was created.
Sent when a vote was removed from a change.
type
“vote-deleted”
change
change attribute
patchSet
patchSet attribute
reviewer
user whose vote was removed as account attribute
remover
user who removed the vote as account attribute
approvals
all votes as approval attributes
comment
Review comment cover message.
Part of Gerrit Code Review