blob: af942a2af7cd8dba473ac241de13bd74d6ae7c80 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - JSON Data
Shawn O. Pearce14760b72010-07-19 09:44:46 -07002
3Some commands produce JSON data streams intended for other
4applications to consume. The structures are documented below.
5Note that any field may be missing in the JSON messages, so consumers
6of this JSON stream should deal with that appropriately.
7
8[[change]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08009== change
Shawn O. Pearce14760b72010-07-19 09:44:46 -070010The Gerrit change being reviewed, or that was already reviewed.
11
David Pursehouse221d4f62012-06-08 17:38:08 +090012project:: Project path in Gerrit.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070013
David Pursehouse221d4f62012-06-08 17:38:08 +090014branch:: Branch name within project.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070015
David Pursehouse221d4f62012-06-08 17:38:08 +090016topic:: Topic name specified by the uploader for this change series.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070017
18id:: Change identifier, as scraped out of the Change-Id field in
19the commit message, or as assigned by the server if it was missing.
20
David Pursehouse221d4f62012-06-08 17:38:08 +090021number:: Change number (deprecated).
Shawn O. Pearce14760b72010-07-19 09:44:46 -070022
David Pursehouse221d4f62012-06-08 17:38:08 +090023subject:: Description of change.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070024
David Pursehouse221d4f62012-06-08 17:38:08 +090025owner:: Owner in <<account,account attribute>>.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070026
David Pursehouse221d4f62012-06-08 17:38:08 +090027url:: Canonical URL to reach this change.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070028
David Pursehouse93a4ae62013-05-01 13:50:09 +090029commitMessage:: The full commit message for the change's current patch
30set.
Brad Larson0943d6e2011-10-27 19:36:27 -050031
David Pursehouse6002bb22012-10-10 11:40:49 +090032createdOn:: Time in seconds since the UNIX epoch when this change
33was created.
34
Shawn O. Pearce14760b72010-07-19 09:44:46 -070035lastUpdated:: Time in seconds since the UNIX epoch when this change
36was last updated.
37
Shawn O. Pearce14760b72010-07-19 09:44:46 -070038open:: Boolean indicating if the change is still open for review.
39
40status:: Current state of this change.
41
42 NEW;; Change is still being reviewed.
43
David Pursehouse981b0162013-02-21 17:27:49 +090044 DRAFT;; Change is a draft change that only consists of draft patchsets.
45
Shawn O. Pearce14760b72010-07-19 09:44:46 -070046 SUBMITTED;; Change has been submitted and is in the merge queue.
47 It may be waiting for one or more dependencies.
48
49 MERGED;; Change has been merged to its branch.
50
51 ABANDONED;; Change was abandoned by its owner or administrator.
52
Bruce Zu6b0fd762012-10-25 16:52:00 +080053comments:: All inline/file comments for this change in <<message,message attributes>>.
David Pursehouse6002bb22012-10-10 11:40:49 +090054
Shawn O. Pearce14760b72010-07-19 09:44:46 -070055trackingIds:: Issue tracking system links in
David Pursehouse6002bb22012-10-10 11:40:49 +090056<<trackingid,trackingid attributes>>, scraped out of the commit
Shawn O. Pearce14760b72010-07-19 09:44:46 -070057message based on the server's
58link:config-gerrit.html#trackingid[trackingid] sections.
59
Edwin Kempina19ff372012-06-14 09:04:32 +020060currentPatchSet:: Current <<patchSet,patchSet attribute>>.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070061
David Pursehouse6002bb22012-10-10 11:40:49 +090062patchSets:: All <<patchSet,patchSet attributes>> for this change.
63
64dependsOn:: List of changes that this change depends on in <<dependency,dependency attributes>>.
65
66neededBy:: List of changes that depend on this change in <<dependency,dependency attributes>>.
Shawn O. Pearce14760b72010-07-19 09:44:46 -070067
James E. Blair3fe3d3f2012-07-20 17:11:37 -070068submitRecords:: The <<submitRecord,submitRecord attribute>> contains
69information about whether this change has been or can be submitted.
70
Mani Chandel72cb6032013-10-17 17:12:03 +053071allReviewers:: List of all reviewers in <<account,account attribute>>
72which are added to a change.
73
Shawn O. Pearce14760b72010-07-19 09:44:46 -070074[[trackingid]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080075== trackingid
Shawn O. Pearce14760b72010-07-19 09:44:46 -070076A link to an issue tracking system.
77
78system:: Name of the system. This comes straight from the
79gerrit.config file.
80
81id:: Id number as scraped out of the commit message.
82
83[[account]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080084== account
Shawn O. Pearce14760b72010-07-19 09:44:46 -070085A user account.
86
87name:: User's full name, if configured.
88
89email:: User's preferred email address.
90
James E. Blairf2c292e2011-11-08 14:52:32 -080091username:: User's username, if configured.
92
Edwin Kempina19ff372012-06-14 09:04:32 +020093[[patchSet]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080094== patchSet
Shawn O. Pearce14760b72010-07-19 09:44:46 -070095Refers to a specific patchset within a <<change,change>>.
96
97number:: The patchset number.
98
99revision:: Git commit for this patchset.
100
David Pursehouse6002bb22012-10-10 11:40:49 +0900101parents:: List of parent revisions.
102
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700103ref:: Git reference pointing at the revision. This reference is
104available through the Gerrit Code Review server's Git interface
105for the containing change.
106
107uploader:: Uploader of the patch set in <<account,account attribute>>.
108
Bruce Zu1a9be5e2012-10-09 14:49:39 +0800109author:: Author of this patchset in <<account,account attribute>>.
110
David Pursehouse6002bb22012-10-10 11:40:49 +0900111createdOn:: Time in seconds since the UNIX epoch when this patchset
112was created.
113
Christian Aistleitnerca504282013-06-18 01:09:33 +0200114isDraft:: Whether or not the patch set is a draft patch set.
115
Doug Kelly40324a82014-05-28 10:21:52 -0500116kind:: Kind of change uploaded.
Doug Kelly58ba2062014-05-15 11:54:44 -0500117
118 REWORK;; Nontrivial content changes.
119
120 TRIVIAL_REBASE;; Conflict-free merge between the new parent and the prior patch set.
121
122 NO_CODE_CHANGE;; No code changed; same tree and same parents.
123
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700124approvals:: The <<approval,approval attribute>> granted.
125
Bruce Zu6b0fd762012-10-25 16:52:00 +0800126comments:: All comments for this patchset in <<patchsetcomment,patchsetComment attributes>>.
David Pursehouse6002bb22012-10-10 11:40:49 +0900127
David Pursehouse5ab70e32013-05-08 05:41:50 +0100128files:: All changed files in this patchset in <<file,file attributes>>.
David Pursehouse6002bb22012-10-10 11:40:49 +0900129
Bruce Zu1a9be5e2012-10-09 14:49:39 +0800130sizeInsertions:: Size information of insertions of this patchset.
131
132sizeDeletions:: Size information of deletions of this patchset.
133
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700134[[approval]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800135== approval
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700136Records the code review approval granted to a patch set.
137
138type:: Internal name of the approval given.
139
140description:: Human readable category of the approval.
141
142value:: Value assigned by the approval, usually a numerical score.
143
144grantedOn:: Time in seconds since the UNIX epoch when this approval
145was added or last updated.
146
147by:: Reviewer of the patch set in <<account,account attribute>>.
148
Edwin Kempina19ff372012-06-14 09:04:32 +0200149[[refUpdate]]
Sven Selberga1a5d622014-11-20 10:37:29 +0900150== refUpdate
Jesse Greenwald6cc11902010-10-06 19:46:25 -0500151Information about a ref that was updated.
152
153oldRev:: The old value of the ref, prior to the update.
154
155newRev:: The new value the ref was updated to.
156
Jesse Greenwald6cc11902010-10-06 19:46:25 -0500157refName:: Ref name within project.
158
David Pursehouse6002bb22012-10-10 11:40:49 +0900159project:: Project path in Gerrit.
160
James E. Blair3fe3d3f2012-07-20 17:11:37 -0700161[[submitRecord]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800162== submitRecord
James E. Blair3fe3d3f2012-07-20 17:11:37 -0700163Information about the submit status of a change.
164
165status:: Current submit status.
166
167 OK;; The change is ready for submission or already submitted.
168
169 NOT_READY;; The change is missing a required label.
170
171 RULE_ERROR;; An internal server error occurred preventing computation.
172
173labels:: This describes the state of each code review
174<<label,label attribute>>, unless the status is RULE_ERROR.
175
176[[label]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800177== label
James E. Blair3fe3d3f2012-07-20 17:11:37 -0700178Information about a code review label for a change.
179
180label:: The name of the label.
181
182status:: The status of the label.
183
184 OK;; This label provides what is necessary for submission.
185
186 REJECT;; This label prevents the change from being submitted.
187
188 NEED;; The label is required for submission, but has not
189 been satisfied.
190
191 MAY;; The label may be set, but it's neither necessary for
192 submission nor does it block submission if set.
193
194 IMPOSSIBLE;; The label is required for submission, but is impossible
195 to complete. The likely cause is access has not been granted
196 correctly by the project owner or site administrator.
197
198by:: The <<account,account>> that applied the label.
199
David Pursehouse6002bb22012-10-10 11:40:49 +0900200[[dependency]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800201== dependency
David Pursehouse6002bb22012-10-10 11:40:49 +0900202Information about a change or patchset dependency.
203
204id:: Change identifier.
205
206number:: Change number.
207
208revision:: Patchset revision.
209
210ref:: Ref name.
211
212isCurrentPatchSet:: If the revision is the current patchset of the change.
213
214[[message]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800215== message
David Pursehouse6002bb22012-10-10 11:40:49 +0900216Comment added on a change by a reviewer.
217
218timestamp:: Time in seconds since the UNIX epoch when this comment
219was added.
220
221reviewer:: The <<account,account>> that added the comment.
222
223message:: The comment text.
224
225[[patchsetcomment]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800226== patchsetComment
Bruce Zu6b0fd762012-10-25 16:52:00 +0800227Comment added on a patchset by a reviewer.
David Pursehouse6002bb22012-10-10 11:40:49 +0900228
229file:: The name of the file on which the comment was added.
230
231line:: The line number at which the comment was added.
232
233reviewer:: The <<account,account>> that added the comment.
234
235message:: The comment text.
236
David Pursehouse5ab70e32013-05-08 05:41:50 +0100237[[file]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800238== file
David Pursehouse6002bb22012-10-10 11:40:49 +0900239Information about a patch on a file.
240
David Pursehouse877d4932012-10-31 10:12:10 +0900241file:: The name of the file. If the file is renamed, the new name.
242
243fileOld:: The old name of the file, if the file is renamed.
David Pursehouse6002bb22012-10-10 11:40:49 +0900244
245type:: The type of change.
246
247 ADDED;; The file is being created/introduced by this patch.
248
249 MODIFIED;; The file already exists, and has updated content.
250
251 DELETED;; The file existed, but is being removed by this patch.
252
253 RENAMED;; The file is renamed.
254
255 COPIED;; The file is copied from another file.
256
257 REWRITE;; Sufficient amount of content changed to claim the file was rewritten.
258
Bruce Zu1a9be5e2012-10-09 14:49:39 +0800259insertions:: number of insertions of this patch.
260
261deletions:: number of deletions of this patch.
David Pursehouse6002bb22012-10-10 11:40:49 +0900262
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800263== SEE ALSO
Shawn O. Pearce14760b72010-07-19 09:44:46 -0700264
265* link:cmd-stream-events.html[gerrit stream-events]
266* link:cmd-query.html[gerrit query]
267
268GERRIT
269------
270Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700271
272SEARCHBOX
273---------