blob: 03aec400b40787c91b493c91a3619969fd44e97c [file] [log] [blame]
Kenny Root15ac1b82010-02-24 00:29:20 -08001gerrit stream-events
2====================
3
4NAME
5----
Edwin Kempinf1acbb82011-09-15 12:49:42 +02006gerrit stream-events - Monitor events occurring in real time
Kenny Root15ac1b82010-02-24 00:29:20 -08007
8SYNOPSIS
9--------
10[verse]
11'ssh' -p <port> <host> 'gerrit stream-events'
12
13DESCRIPTION
14-----------
15
Edwin Kempinf1acbb82011-09-15 12:49:42 +020016Provides a portal into the major events occurring on the server,
Kenny Root15ac1b82010-02-24 00:29:20 -080017outputing activity data in real-time to the client. Events are
18filtered by the caller's access permissions, ensuring the caller
19only receives events for changes they can view on the web, or in
20the project repository.
21
22Event output is in JSON, one event per line.
23
24ACCESS
25------
26Any user who has configured an SSH key.
27
28SCRIPTING
29---------
30This command is intended to be used in scripts.
31
32EXAMPLES
33--------
34
Shawn O. Pearce47769242011-06-14 16:40:48 -070035====
Kenny Root15ac1b82010-02-24 00:29:20 -080036 $ ssh -p 29418 review.example.com gerrit stream-events
Kenny Rootd8dffa22010-02-25 22:28:20 -080037 {"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
38 {"type":"comment-added",change:{"project":"tools/gerrit", ...}, ...}
Shawn O. Pearce47769242011-06-14 16:40:48 -070039====
Kenny Root15ac1b82010-02-24 00:29:20 -080040
Kenny Rootd8dffa22010-02-25 22:28:20 -080041SCHEMA
42------
43The JSON messages consist of nested objects referencing the *change*,
Edwin Kempina19ff372012-06-14 09:04:32 +020044*patchSet*, *account* involved, and other attributes as appropriate.
Maciej Żenczykowski9741bab2010-10-17 01:21:45 -070045The currently supported message types are *patchset-created*,
David Pursehoused556c192012-06-12 18:34:37 +090046*draft-published*, *change-abandoned*, *change-restored*,
David Pursehouse2336bd82012-09-21 12:50:19 +090047*change-merged*, *comment-added*, *ref-updated* and *reviewer-added*.
Kenny Rootd8dffa22010-02-25 22:28:20 -080048
49Note that any field may be missing in the JSON messages, so consumers of
50this JSON stream should deal with that appropriately.
51
52Events
53~~~~~~
Maciej Żenczykowski9741bab2010-10-17 01:21:45 -070054Patchset Created
55^^^^^^^^^^^^^^^^
56type:: "patchset-created"
Kenny Rootd8dffa22010-02-25 22:28:20 -080057
Shawn O. Pearce14760b72010-07-19 09:44:46 -070058change:: link:json.html#change[change attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -080059
Edwin Kempina19ff372012-06-14 09:04:32 +020060patchSet:: link:json.html#patchSet[patchSet attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -080061
Shawn O. Pearce14760b72010-07-19 09:44:46 -070062uploader:: link:json.html#account[account attribute]
Scott Andersonde08e632010-06-15 16:04:28 -070063
David Pursehoused556c192012-06-12 18:34:37 +090064Draft Published
65^^^^^^^^^^^^^^^
66type:: "draft-published"
67
68change:: link:json.html#change[change attribute]
69
Edwin Kempina319d352012-09-06 10:28:11 +020070patchset:: link:json.html#patchSet[patchset attribute]
David Pursehoused556c192012-06-12 18:34:37 +090071
72uploader:: link:json.html#account[account attribute]
73
Kenny Rootd8dffa22010-02-25 22:28:20 -080074Change Abandoned
75^^^^^^^^^^^^^^^^
76type:: "change-abandoned"
77
Shawn O. Pearce14760b72010-07-19 09:44:46 -070078change:: link:json.html#change[change attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -080079
Edwin Kempina19ff372012-06-14 09:04:32 +020080patchSet:: link:json.html#patchSet[patchSet attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -080081
Shawn O. Pearce14760b72010-07-19 09:44:46 -070082abandoner:: link:json.html#account[account attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -080083
Edwin Kempina19ff372012-06-14 09:04:32 +020084reason:: Reason for abandoning the change.
85
Anatol Pomazau32002452010-08-04 11:28:50 -070086Change Restored
Edwin Kempina19ff372012-06-14 09:04:32 +020087^^^^^^^^^^^^^^^
Anatol Pomazau32002452010-08-04 11:28:50 -070088type:: "change-restored"
89
90change:: link:json.html#change[change attribute]
91
Edwin Kempina19ff372012-06-14 09:04:32 +020092patchSet:: link:json.html#patchSet[patchSet attribute]
Anatol Pomazau32002452010-08-04 11:28:50 -070093
94restorer:: link:json.html#account[account attribute]
95
Edwin Kempina19ff372012-06-14 09:04:32 +020096reason:: Reason for restoring the change.
97
Kenny Rootd8dffa22010-02-25 22:28:20 -080098Change Merged
99^^^^^^^^^^^^^
100type:: "change-merged"
101
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700102change:: link:json.html#change[change attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -0800103
Edwin Kempina19ff372012-06-14 09:04:32 +0200104patchSet:: link:json.html#patchSet[patchSet attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -0800105
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700106submitter:: link:json.html#account[account attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -0800107
108Comment Added
109^^^^^^^^^^^^^
110type:: "comment-added"
111
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700112change:: link:json.html#change[change attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -0800113
Edwin Kempina19ff372012-06-14 09:04:32 +0200114patchSet:: link:json.html#patchSet[patchSet attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -0800115
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700116author:: link:json.html#account[account attribute]
Kenny Rootd8dffa22010-02-25 22:28:20 -0800117
Edwin Kempina19ff372012-06-14 09:04:32 +0200118approvals:: All link:json.html#approval[approval attributes] granted.
119
Kenny Rootd8dffa22010-02-25 22:28:20 -0800120comment:: Comment text author had written
121
Jesse Greenwald6cc11902010-10-06 19:46:25 -0500122Ref Updated
123^^^^^^^^^^^
124type:: "ref-updated"
125
126submitter:: link:json.html#account[account attribute]
127
Edwin Kempina19ff372012-06-14 09:04:32 +0200128refUpdate:: link:json.html#refUpdate[refUpdate attribute]
Jesse Greenwald6cc11902010-10-06 19:46:25 -0500129
David Pursehouse2336bd82012-09-21 12:50:19 +0900130Reviewer Added
131^^^^^^^^^^^^^^
132type:: "reviewer-added"
133
134change:: link:json.html#change[change attribute]
135
136patchset:: link:json.html#patchSet[patchset attribute]
137
138reviewer:: link:json.html#account[account attribute]
139
Jesse Greenwald6cc11902010-10-06 19:46:25 -0500140
Kenny Root15ac1b82010-02-24 00:29:20 -0800141SEE ALSO
142--------
143
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700144* link:json.html[JSON Data Formats]
Kenny Root15ac1b82010-02-24 00:29:20 -0800145* link:access-control.html[Access Controls]
146
147GERRIT
148------
149Part of link:index.html[Gerrit Code Review]