blob: 1c9a808dbeae99b265a8eb2c4d334fcf13324a18 [file] [log] [blame]
Shawn O. Pearce14760b72010-07-19 09:44:46 -07001Gerrit Code Review - JSON Data
2==============================
3
4Some commands produce JSON data streams intended for other
5applications to consume. The structures are documented below.
6Note that any field may be missing in the JSON messages, so consumers
7of this JSON stream should deal with that appropriately.
8
9[[change]]
10change
11------
12The Gerrit change being reviewed, or that was already reviewed.
13
14project:: Project path in Gerrit
15
16branch:: Branch name within project
17
18topic:: Topic name specified by the uploader for this change series
19
20id:: Change identifier, as scraped out of the Change-Id field in
21the commit message, or as assigned by the server if it was missing.
22
23number:: Change number (deprecated)
24
25subject:: Description of change
26
27owner:: Owner in <<account,account attribute>>
28
29url:: Canonical URL to reach this change
30
31lastUpdated:: Time in seconds since the UNIX epoch when this change
32was last updated.
33
34sortKey:: Internal key used to sort changes, based on lastUpdated.
35
36open:: Boolean indicating if the change is still open for review.
37
38status:: Current state of this change.
39
40 NEW;; Change is still being reviewed.
41
42 SUBMITTED;; Change has been submitted and is in the merge queue.
43 It may be waiting for one or more dependencies.
44
45 MERGED;; Change has been merged to its branch.
46
47 ABANDONED;; Change was abandoned by its owner or administrator.
48
49trackingIds:: Issue tracking system links in
50<<trackingid,trackingid attribute>>, scraped out of the commit
51message based on the server's
52link:config-gerrit.html#trackingid[trackingid] sections.
53
54currentPatchSet:: Current <<patchset,patchset attribute>>.
55
56patchSets:: All <<patchset,patchset attribute>> for this change.
57
58[[trackingid]]
59trackingid
60----------
61A link to an issue tracking system.
62
63system:: Name of the system. This comes straight from the
64gerrit.config file.
65
66id:: Id number as scraped out of the commit message.
67
68[[account]]
69account
70-------
71A user account.
72
73name:: User's full name, if configured.
74
75email:: User's preferred email address.
76
77[[patchset]]
78patchset
79--------
80Refers to a specific patchset within a <<change,change>>.
81
82number:: The patchset number.
83
84revision:: Git commit for this patchset.
85
86ref:: Git reference pointing at the revision. This reference is
87available through the Gerrit Code Review server's Git interface
88for the containing change.
89
90uploader:: Uploader of the patch set in <<account,account attribute>>.
91
92approvals:: The <<approval,approval attribute>> granted.
93
94[[approval]]
95approval
96--------
97Records the code review approval granted to a patch set.
98
99type:: Internal name of the approval given.
100
101description:: Human readable category of the approval.
102
103value:: Value assigned by the approval, usually a numerical score.
104
105grantedOn:: Time in seconds since the UNIX epoch when this approval
106was added or last updated.
107
108by:: Reviewer of the patch set in <<account,account attribute>>.
109
110SEE ALSO
111--------
112
113* link:cmd-stream-events.html[gerrit stream-events]
114* link:cmd-query.html[gerrit query]
115
116GERRIT
117------
118Part of link:index.html[Gerrit Code Review]