Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - /changes/ REST API |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2 | |
| 3 | This page describes the change related REST endpoints. |
| 4 | Please also take note of the general information on the |
| 5 | link:rest-api.html[REST API]. |
| 6 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 7 | [[change-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8 | == Change Endpoints |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 9 | |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 10 | [[create-change]] |
| 11 | === Create Change |
| 12 | -- |
| 13 | 'POST /changes' |
| 14 | -- |
| 15 | |
Yuxuan 'fishy' Wang | af6807f | 2016-02-10 15:11:57 -0800 | [diff] [blame] | 16 | The change input link:#change-input[ChangeInput] entity must be provided in the |
| 17 | request body. |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 18 | |
| 19 | .Request |
| 20 | ---- |
| 21 | POST /changes HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 22 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 23 | |
| 24 | { |
| 25 | "project" : "myProject", |
| 26 | "subject" : "Let's support 100% Gerrit workflow direct in browser", |
| 27 | "branch" : "master", |
| 28 | "topic" : "create-change-in-browser", |
| 29 | "status" : "DRAFT" |
| 30 | } |
| 31 | ---- |
| 32 | |
| 33 | As response a link:#change-info[ChangeInfo] entity is returned that describes |
| 34 | the resulting change. |
| 35 | |
| 36 | .Response |
| 37 | ---- |
| 38 | HTTP/1.1 200 OK |
| 39 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 40 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 41 | |
| 42 | )]}' |
| 43 | { |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 44 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 45 | "project": "myProject", |
| 46 | "branch": "master", |
| 47 | "topic": "create-change-in-browser", |
| 48 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 49 | "subject": "Let's support 100% Gerrit workflow direct in browser", |
| 50 | "status": "DRAFT", |
| 51 | "created": "2014-05-05 07:15:44.639000000", |
| 52 | "updated": "2014-05-05 07:15:44.639000000", |
| 53 | "mergeable": true, |
| 54 | "insertions": 0, |
| 55 | "deletions": 0, |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 56 | "_number": 4711, |
| 57 | "owner": { |
| 58 | "name": "John Doe" |
| 59 | } |
| 60 | } |
| 61 | ---- |
| 62 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 63 | [[list-changes]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 64 | === Query Changes |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 65 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 66 | 'GET /changes/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 67 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 68 | |
Saša Živkov | dd80402 | 2014-06-23 16:44:03 +0200 | [diff] [blame] | 69 | Queries changes visible to the caller. The |
| 70 | link:user-search.html#_search_operators[query string] must be provided |
| 71 | by the `q` parameter. The `n` parameter can be used to limit the |
| 72 | returned results. |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 73 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 74 | As result a list of link:#change-info[ChangeInfo] entries is returned. |
| 75 | The change output is sorted by the last update time, most recently |
| 76 | updated to oldest updated. |
| 77 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 78 | Query for open changes of watched projects: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 79 | |
| 80 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 81 | ---- |
Edwin Kempin | 2091edb | 2013-01-23 19:07:38 +0100 | [diff] [blame] | 82 | GET /changes/?q=status:open+is:watched&n=2 HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 83 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 84 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 85 | .Response |
| 86 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 87 | HTTP/1.1 200 OK |
| 88 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 89 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 90 | |
| 91 | )]}' |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 92 | [ |
| 93 | { |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 94 | "id": "demo~master~Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 95 | "project": "demo", |
| 96 | "branch": "master", |
| 97 | "change_id": "Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 98 | "subject": "One change", |
| 99 | "status": "NEW", |
| 100 | "created": "2012-07-17 07:18:30.854000000", |
| 101 | "updated": "2012-07-17 07:19:27.766000000", |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 102 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 103 | "insertions": 26, |
| 104 | "deletions": 10, |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 105 | "_number": 1756, |
| 106 | "owner": { |
| 107 | "name": "John Doe" |
| 108 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 109 | }, |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 110 | { |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 111 | "id": "demo~master~I09c8041b5867d5b33170316e2abc34b79bbb8501", |
| 112 | "project": "demo", |
| 113 | "branch": "master", |
| 114 | "change_id": "I09c8041b5867d5b33170316e2abc34b79bbb8501", |
| 115 | "subject": "Another change", |
| 116 | "status": "NEW", |
| 117 | "created": "2012-07-17 07:18:30.884000000", |
| 118 | "updated": "2012-07-17 07:18:30.885000000", |
| 119 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 120 | "insertions": 12, |
| 121 | "deletions": 18, |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 122 | "_number": 1757, |
| 123 | "owner": { |
| 124 | "name": "John Doe" |
| 125 | }, |
| 126 | "_more_changes": true |
| 127 | } |
| 128 | ] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 129 | ---- |
| 130 | |
Sebastian Schuberth | 02bafe0 | 2016-01-20 21:38:11 +0100 | [diff] [blame] | 131 | If the number of changes matching the query exceeds either the internal |
| 132 | limit or a supplied `n` query parameter, the last change object has a |
David Pursehouse | 025ea3e | 2014-09-03 10:47:34 +0900 | [diff] [blame] | 133 | `_more_changes: true` JSON field set. |
| 134 | |
| 135 | The `S` or `start` query parameter can be supplied to skip a number |
| 136 | of changes from the list. |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 137 | |
| 138 | Clients are allowed to specify more than one query by setting the `q` |
| 139 | parameter multiple times. In this case the result is an array of |
| 140 | arrays, one per query in the same order the queries were given in. |
| 141 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 142 | .Query for the 25 most recent open changes of the projects that you watch |
| 143 | **** |
| 144 | get::/changes/?q=status:open+is:watched&n=25 |
| 145 | **** |
| 146 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 147 | Query that retrieves changes for a user's dashboard: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 148 | |
| 149 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 150 | ---- |
| 151 | GET /changes/?q=is:open+owner:self&q=is:open+reviewer:self+-owner:self&q=is:closed+owner:self+limit:5&o=LABELS HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 152 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 153 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 154 | .Response |
| 155 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 156 | HTTP/1.1 200 OK |
| 157 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 158 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 159 | |
| 160 | )]}' |
| 161 | [ |
| 162 | [ |
| 163 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 164 | "id": "demo~master~Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 165 | "project": "demo", |
| 166 | "branch": "master", |
| 167 | "change_id": "Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 168 | "subject": "One change", |
| 169 | "status": "NEW", |
| 170 | "created": "2012-07-17 07:18:30.854000000", |
| 171 | "updated": "2012-07-17 07:19:27.766000000", |
Edwin Kempin | db1f0b8 | 2013-02-21 15:07:00 +0100 | [diff] [blame] | 172 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 173 | "insertions": 4, |
| 174 | "deletions": 7, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 175 | "_number": 1756, |
| 176 | "owner": { |
| 177 | "name": "John Doe" |
| 178 | }, |
| 179 | "labels": { |
| 180 | "Verified": {}, |
| 181 | "Code-Review": {} |
| 182 | } |
| 183 | } |
| 184 | ], |
| 185 | [], |
| 186 | [] |
| 187 | ] |
| 188 | ---- |
| 189 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 190 | .Query the changes for your user dashboard |
| 191 | **** |
| 192 | get::/changes/?q=is:open+owner:self&q=is:open+reviewer:self+-owner:self&q=is:closed+owner:self+limit:5&o=LABELS |
| 193 | **** |
| 194 | |
David Pursehouse | 2cf2843 | 2016-08-21 23:20:08 +0900 | [diff] [blame] | 195 | [[query-options]] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 196 | Additional fields can be obtained by adding `o` parameters, each |
| 197 | option requires more database lookups and slows down the query |
| 198 | response time to the client so they are generally disabled by |
| 199 | default. Optional fields are: |
| 200 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 201 | [[labels]] |
| 202 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 203 | * `LABELS`: a summary of each label required for submit, and |
| 204 | approvers that have granted (or rejected) with that label. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 205 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 206 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 207 | [[detailed-labels]] |
| 208 | -- |
Dave Borowitz | 4c7231a | 2013-01-30 16:18:59 -0800 | [diff] [blame] | 209 | * `DETAILED_LABELS`: detailed label information, including numeric |
Dave Borowitz | 992ddd7 | 2013-02-13 11:53:17 -0800 | [diff] [blame] | 210 | values of all existing approvals, recognized label values, values |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 211 | permitted to be set by the current user, all reviewers by state, and |
| 212 | reviewers that may be removed by the current user. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 213 | -- |
Dave Borowitz | 4c7231a | 2013-01-30 16:18:59 -0800 | [diff] [blame] | 214 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 215 | [[current-revision]] |
| 216 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 217 | * `CURRENT_REVISION`: describe the current revision (patch set) |
| 218 | of the change, including the commit SHA-1 and URLs to fetch from. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 219 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 220 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 221 | [[all-revisions]] |
| 222 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 223 | * `ALL_REVISIONS`: describe all revisions, not just current. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 224 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 225 | |
David Pursehouse | 025c1af | 2015-11-20 17:02:50 +0900 | [diff] [blame] | 226 | [[download-commands]] |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 227 | -- |
| 228 | * `DOWNLOAD_COMMANDS`: include the `commands` field in the |
| 229 | link:#fetch-info[FetchInfo] for revisions. Only valid when the |
| 230 | `CURRENT_REVISION` or `ALL_REVISIONS` option is selected. |
| 231 | -- |
| 232 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 233 | [[current-commit]] |
| 234 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 235 | * `CURRENT_COMMIT`: parse and output all header fields from the |
David Pursehouse | 98006e8 | 2013-10-02 10:15:52 +0900 | [diff] [blame] | 236 | commit object, including message. Only valid when the |
| 237 | `CURRENT_REVISION` or `ALL_REVISIONS` option is selected. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 238 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 239 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 240 | [[all-commits]] |
| 241 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 242 | * `ALL_COMMITS`: parse and output all header fields from the |
| 243 | output revisions. If only `CURRENT_REVISION` was requested |
| 244 | then only the current revision's commit data will be output. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 245 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 246 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 247 | [[current-files]] |
| 248 | -- |
Edwin Kempin | 8fd96b9 | 2016-12-05 16:39:03 +0100 | [diff] [blame] | 249 | * `CURRENT_FILES`: list files modified by the commit and magic files, |
| 250 | including basic line counts inserted/deleted per file. Only valid |
| 251 | when the `CURRENT_REVISION` or `ALL_REVISIONS` option is selected. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 252 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 253 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 254 | [[all-files]] |
| 255 | -- |
Edwin Kempin | 8fd96b9 | 2016-12-05 16:39:03 +0100 | [diff] [blame] | 256 | * `ALL_FILES`: list files modified by the commit and magic files, |
| 257 | including basic line counts inserted/deleted per file. If only the |
| 258 | `CURRENT_REVISION` was requested then only that commit's modified |
| 259 | files will be output. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 260 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 261 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 262 | [[detailed-accounts]] |
| 263 | -- |
Edwin Kempin | 4a00e22 | 2013-10-16 14:34:24 +0200 | [diff] [blame] | 264 | * `DETAILED_ACCOUNTS`: include `_account_id`, `email` and `username` |
| 265 | fields when referencing accounts. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 266 | -- |
Dave Borowitz | 8926a88 | 2013-02-01 14:32:48 -0800 | [diff] [blame] | 267 | |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 268 | [[reviewer-updates]] |
| 269 | -- |
| 270 | * `REVIEWER_UPDATES`: include updates to reviewers set as |
| 271 | link:#review-update-info[ReviewerUpdateInfo] entities. |
| 272 | -- |
| 273 | |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 274 | [[messages]] |
| 275 | -- |
| 276 | * `MESSAGES`: include messages associated with the change. |
| 277 | -- |
| 278 | |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 279 | [[actions]] |
| 280 | -- |
| 281 | * `CURRENT_ACTIONS`: include information on available actions |
Stefan Beller | 09cd95d | 2015-02-12 13:40:23 -0800 | [diff] [blame] | 282 | for the change and its current revision. Ignored if the caller |
| 283 | is not authenticated. |
| 284 | -- |
| 285 | |
| 286 | [[change-actions]] |
| 287 | -- |
| 288 | * `CHANGE_ACTIONS`: include information on available |
| 289 | change actions for the change. Ignored if the caller |
| 290 | is not authenticated. |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 291 | -- |
| 292 | |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 293 | [[reviewed]] |
| 294 | -- |
Dave Borowitz | 86669b3 | 2015-05-27 14:56:10 -0700 | [diff] [blame] | 295 | * `REVIEWED`: include the `reviewed` field if all of the following are |
| 296 | true: |
| 297 | * the change is open |
| 298 | * the caller is authenticated |
| 299 | * the caller has commented on the change more recently than the last update |
| 300 | from the change owner, i.e. this change would show up in the results of |
| 301 | link:user-search.html#reviewedby[reviewedby:self]. |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 302 | -- |
| 303 | |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 304 | [[submittable]] |
| 305 | -- |
Jonathan Nieder | ad5240f | 2016-10-04 11:03:23 -0700 | [diff] [blame] | 306 | * `SUBMITTABLE`: include the `submittable` field in link:#change-info[ChangeInfo], |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 307 | which can be used to tell if the change is reviewed and ready for submit. |
| 308 | -- |
| 309 | |
Khai Do | 2a23ec8 | 2014-09-19 16:33:02 -0700 | [diff] [blame] | 310 | [[web-links]] |
Sven Selberg | ae1a10c | 2014-02-14 14:24:29 +0100 | [diff] [blame] | 311 | -- |
Sven Selberg | d26bd54 | 2014-11-21 16:28:10 +0100 | [diff] [blame] | 312 | * `WEB_LINKS`: include the `web_links` field in link:#commit-info[CommitInfo], |
| 313 | therefore only valid in combination with `CURRENT_COMMIT` or |
| 314 | `ALL_COMMITS`. |
Sven Selberg | ae1a10c | 2014-02-14 14:24:29 +0100 | [diff] [blame] | 315 | -- |
| 316 | |
Dave Borowitz | 4c46c24 | 2014-12-03 16:46:45 -0800 | [diff] [blame] | 317 | [[check]] |
| 318 | -- |
| 319 | * `CHECK`: include potential problems with the change. |
| 320 | -- |
| 321 | |
Dave Borowitz | d5ebd9b | 2015-04-23 17:19:34 -0700 | [diff] [blame] | 322 | [[commit-footers]] |
| 323 | -- |
| 324 | * `COMMIT_FOOTERS`: include the full commit message with |
| 325 | Gerrit-specific commit footers in the |
| 326 | link:#revision-info[RevisionInfo]. |
Yuxuan 'fishy' Wang | 16baf21 | 2015-05-05 16:49:55 -0700 | [diff] [blame] | 327 | -- |
Dave Borowitz | d5ebd9b | 2015-04-23 17:19:34 -0700 | [diff] [blame] | 328 | |
Dave Borowitz | 6f58dbe | 2015-09-14 12:34:31 -0400 | [diff] [blame] | 329 | [[push-certificates]] |
| 330 | -- |
| 331 | * `PUSH_CERTIFICATES`: include push certificate information in the |
| 332 | link:#revision-info[RevisionInfo]. Ignored if signed push is not |
| 333 | link:config-gerrit.html#receive.enableSignedPush[enabled] on the |
| 334 | server. |
| 335 | -- |
| 336 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 337 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 338 | ---- |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 339 | GET /changes/?q=97&o=CURRENT_REVISION&o=CURRENT_COMMIT&o=CURRENT_FILES&o=DOWNLOAD_COMMANDS HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 340 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 341 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 342 | .Response |
| 343 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 344 | HTTP/1.1 200 OK |
| 345 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 346 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 347 | |
| 348 | )]}' |
| 349 | [ |
| 350 | { |
David Pursehouse | c3be6ad | 2014-07-18 12:03:06 +0900 | [diff] [blame] | 351 | "id": "gerrit~master~I7ea46d2e2ee5c64c0d807677859cfb7d90b8966a", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 352 | "project": "gerrit", |
| 353 | "branch": "master", |
| 354 | "change_id": "I7ea46d2e2ee5c64c0d807677859cfb7d90b8966a", |
| 355 | "subject": "Use an EventBus to manage star icons", |
| 356 | "status": "NEW", |
| 357 | "created": "2012-04-25 00:52:25.580000000", |
| 358 | "updated": "2012-04-25 00:52:25.586000000", |
Edwin Kempin | db1f0b8 | 2013-02-21 15:07:00 +0100 | [diff] [blame] | 359 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 360 | "insertions": 16, |
| 361 | "deletions": 7, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 362 | "_number": 97, |
| 363 | "owner": { |
| 364 | "name": "Shawn Pearce" |
| 365 | }, |
| 366 | "current_revision": "184ebe53805e102605d11f6b143486d15c23a09c", |
| 367 | "revisions": { |
| 368 | "184ebe53805e102605d11f6b143486d15c23a09c": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 369 | "kind": "REWORK", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 370 | "_number": 1, |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 371 | "ref": "refs/changes/97/97/1", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 372 | "fetch": { |
| 373 | "git": { |
| 374 | "url": "git://localhost/gerrit", |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 375 | "ref": "refs/changes/97/97/1", |
| 376 | "commands": { |
| 377 | "Checkout": "git fetch git://localhost/gerrit refs/changes/97/97/1 \u0026\u0026 git checkout FETCH_HEAD", |
| 378 | "Cherry-Pick": "git fetch git://localhost/gerrit refs/changes/97/97/1 \u0026\u0026 git cherry-pick FETCH_HEAD", |
| 379 | "Format-Patch": "git fetch git://localhost/gerrit refs/changes/97/97/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", |
| 380 | "Pull": "git pull git://localhost/gerrit refs/changes/97/97/1" |
| 381 | } |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 382 | }, |
| 383 | "http": { |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 384 | "url": "http://myuser@127.0.0.1:8080/gerrit", |
| 385 | "ref": "refs/changes/97/97/1", |
| 386 | "commands": { |
| 387 | "Checkout": "git fetch http://myuser@127.0.0.1:8080/gerrit refs/changes/97/97/1 \u0026\u0026 git checkout FETCH_HEAD", |
| 388 | "Cherry-Pick": "git fetch http://myuser@127.0.0.1:8080/gerrit refs/changes/97/97/1 \u0026\u0026 git cherry-pick FETCH_HEAD", |
| 389 | "Format-Patch": "git fetch http://myuser@127.0.0.1:8080/gerrit refs/changes/97/97/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", |
| 390 | "Pull": "git pull http://myuser@127.0.0.1:8080/gerrit refs/changes/97/97/1" |
| 391 | } |
| 392 | }, |
| 393 | "ssh": { |
| 394 | "url": "ssh://myuser@*:29418/gerrit", |
| 395 | "ref": "refs/changes/97/97/1", |
| 396 | "commands": { |
| 397 | "Checkout": "git fetch ssh://myuser@*:29418/gerrit refs/changes/97/97/1 \u0026\u0026 git checkout FETCH_HEAD", |
| 398 | "Cherry-Pick": "git fetch ssh://myuser@*:29418/gerrit refs/changes/97/97/1 \u0026\u0026 git cherry-pick FETCH_HEAD", |
| 399 | "Format-Patch": "git fetch ssh://myuser@*:29418/gerrit refs/changes/97/97/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", |
| 400 | "Pull": "git pull ssh://myuser@*:29418/gerrit refs/changes/97/97/1" |
| 401 | } |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 402 | } |
| 403 | }, |
| 404 | "commit": { |
| 405 | "parents": [ |
| 406 | { |
| 407 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 408 | "subject": "Migrate contributor agreements to All-Projects." |
| 409 | } |
| 410 | ], |
| 411 | "author": { |
| 412 | "name": "Shawn O. Pearce", |
| 413 | "email": "sop@google.com", |
| 414 | "date": "2012-04-24 18:08:08.000000000", |
| 415 | "tz": -420 |
| 416 | }, |
| 417 | "committer": { |
| 418 | "name": "Shawn O. Pearce", |
| 419 | "email": "sop@google.com", |
| 420 | "date": "2012-04-24 18:08:08.000000000", |
| 421 | "tz": -420 |
| 422 | }, |
| 423 | "subject": "Use an EventBus to manage star icons", |
| 424 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 425 | }, |
| 426 | "files": { |
| 427 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeCache.java": { |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 428 | "lines_deleted": 8, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 429 | "size_delta": -412, |
| 430 | "size": 7782 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 431 | }, |
| 432 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeDetailCache.java": { |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 433 | "lines_inserted": 1, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 434 | "size_delta": 23, |
| 435 | "size": 6762 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 436 | }, |
| 437 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java": { |
| 438 | "lines_inserted": 11, |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 439 | "lines_deleted": 19, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 440 | "size_delta": -298, |
| 441 | "size": 47023 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 442 | }, |
| 443 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java": { |
| 444 | "lines_inserted": 23, |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 445 | "lines_deleted": 20, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 446 | "size_delta": 132, |
| 447 | "size": 17727 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 448 | }, |
| 449 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/StarCache.java": { |
| 450 | "status": "D", |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 451 | "lines_deleted": 139, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 452 | "size_delta": -5512, |
| 453 | "size": 13098 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 454 | }, |
| 455 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/StarredChanges.java": { |
| 456 | "status": "A", |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 457 | "lines_inserted": 204, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 458 | "size_delta": 8345, |
| 459 | "size": 8345 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 460 | }, |
| 461 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/ui/Screen.java": { |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 462 | "lines_deleted": 9, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 463 | "size_delta": -343, |
| 464 | "size": 5385 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 465 | } |
| 466 | } |
| 467 | } |
| 468 | } |
| 469 | } |
| 470 | ] |
| 471 | ---- |
| 472 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 473 | [[get-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 474 | === Get Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 475 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 476 | 'GET /changes/link:#change-id[\{change-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 477 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 478 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 479 | Retrieves a change. |
| 480 | |
Dave Borowitz | 0314f73 | 2013-10-03 09:34:30 -0700 | [diff] [blame] | 481 | Additional fields can be obtained by adding `o` parameters, each |
| 482 | option requires more database lookups and slows down the query |
| 483 | response time to the client so they are generally disabled by |
| 484 | default. Fields are described in link:#list-changes[Query Changes]. |
| 485 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 486 | .Request |
| 487 | ---- |
| 488 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0 |
| 489 | ---- |
| 490 | |
| 491 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 492 | describes the change. |
| 493 | |
| 494 | .Response |
| 495 | ---- |
| 496 | HTTP/1.1 200 OK |
| 497 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 498 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 499 | |
| 500 | )]}' |
| 501 | { |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 502 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 503 | "project": "myProject", |
| 504 | "branch": "master", |
| 505 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 506 | "subject": "Implementing Feature X", |
| 507 | "status": "NEW", |
| 508 | "created": "2013-02-01 09:59:32.126000000", |
| 509 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 510 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 511 | "insertions": 34, |
| 512 | "deletions": 101, |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 513 | "_number": 3965, |
| 514 | "owner": { |
| 515 | "name": "John Doe" |
| 516 | } |
| 517 | } |
| 518 | ---- |
| 519 | |
Zhen Chen | b1e07e5 | 2016-09-23 12:59:48 -0700 | [diff] [blame] | 520 | [[create-merge-patch-set-for-change]] |
| 521 | === Create Merge Patch Set For Change |
| 522 | -- |
| 523 | 'POST /changes/link:#change-id[\{change-id\}]/merge' |
| 524 | -- |
| 525 | |
| 526 | Update an existing change by using a |
| 527 | link:#merge-patch-set-input[MergePatchSetInput] entity. |
| 528 | |
| 529 | Gerrit will create a merge commit based on the information of |
| 530 | MergePatchSetInput and add a new patch set to the change corresponding |
| 531 | to the new merge commit. |
| 532 | |
| 533 | .Request |
| 534 | ---- |
| 535 | POST /changes/test~master~Ic5466d107c5294414710935a8ef3b0180fb848dc/merge HTTP/1.0 |
| 536 | Content-Type: application/json; charset=UTF-8 |
| 537 | |
| 538 | { |
| 539 | "source": "refs/12/1234/1" |
| 540 | } |
| 541 | ---- |
| 542 | |
| 543 | As response a link:#change-info[ChangeInfo] entity with current revision is |
| 544 | returned that describes the resulting change. |
| 545 | |
| 546 | .Response |
| 547 | ---- |
| 548 | HTTP/1.1 200 OK |
| 549 | Content-Disposition: attachment |
| 550 | Content-Type: application/json; charset=UTF-8 |
| 551 | |
| 552 | )]}' |
| 553 | { |
| 554 | "id": "test~master~Ic5466d107c5294414710935a8ef3b0180fb848dc", |
| 555 | "project": "test", |
| 556 | "branch": "master", |
| 557 | "hashtags": [], |
| 558 | "change_id": "Ic5466d107c5294414710935a8ef3b0180fb848dc", |
| 559 | "subject": "Merge dev_branch into master", |
| 560 | "status": "NEW", |
| 561 | "created": "2016-09-23 18:08:53.238000000", |
| 562 | "updated": "2016-09-23 18:09:25.934000000", |
| 563 | "submit_type": "MERGE_IF_NECESSARY", |
| 564 | "mergeable": true, |
| 565 | "insertions": 5, |
| 566 | "deletions": 0, |
| 567 | "_number": 72, |
| 568 | "owner": { |
| 569 | "_account_id": 1000000 |
| 570 | }, |
| 571 | "current_revision": "27cc4558b5a3d3387dd11ee2df7a117e7e581822" |
| 572 | } |
| 573 | ---- |
| 574 | |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 575 | [[get-change-detail]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 576 | === Get Change Detail |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 577 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 578 | 'GET /changes/link:#change-id[\{change-id\}]/detail' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 579 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 580 | |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 581 | Retrieves a change with link:#labels[labels], link:#detailed-labels[ |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 582 | detailed labels], link:#detailed-accounts[detailed accounts], |
| 583 | link:#reviewer-updates[reviewer updates], and link:#messages[messages]. |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 584 | |
Shawn Pearce | 7f3dccf | 2013-07-06 19:24:29 -0700 | [diff] [blame] | 585 | Additional fields can be obtained by adding `o` parameters, each |
| 586 | option requires more database lookups and slows down the query |
| 587 | response time to the client so they are generally disabled by |
| 588 | default. Fields are described in link:#list-changes[Query Changes]. |
| 589 | |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 590 | .Request |
| 591 | ---- |
| 592 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/detail HTTP/1.0 |
| 593 | ---- |
| 594 | |
| 595 | As response a link:#change-info[ChangeInfo] entity is returned that |
Khai Do | ad63201 | 2014-06-22 08:29:57 -0700 | [diff] [blame] | 596 | describes the change. This response will contain all votes for each |
| 597 | label and include one combined vote. The combined label vote is |
| 598 | calculated in the following order (from highest to lowest): |
| 599 | REJECTED > APPROVED > DISLIKED > RECOMMENDED. |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 600 | |
| 601 | .Response |
| 602 | ---- |
| 603 | HTTP/1.1 200 OK |
| 604 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 605 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 606 | |
| 607 | )]}' |
| 608 | { |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 609 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 610 | "project": "myProject", |
| 611 | "branch": "master", |
| 612 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 613 | "subject": "Implementing Feature X", |
| 614 | "status": "NEW", |
| 615 | "created": "2013-02-01 09:59:32.126000000", |
| 616 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 617 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 618 | "insertions": 126, |
| 619 | "deletions": 11, |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 620 | "_number": 3965, |
| 621 | "owner": { |
| 622 | "_account_id": 1000096, |
| 623 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 624 | "email": "john.doe@example.com", |
| 625 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 626 | }, |
| 627 | "labels": { |
| 628 | "Verified": { |
| 629 | "all": [ |
| 630 | { |
| 631 | "value": 0, |
| 632 | "_account_id": 1000096, |
| 633 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 634 | "email": "john.doe@example.com", |
| 635 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 636 | }, |
| 637 | { |
| 638 | "value": 0, |
| 639 | "_account_id": 1000097, |
| 640 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 641 | "email": "jane.roe@example.com", |
| 642 | "username": "jroe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 643 | } |
| 644 | ], |
| 645 | "values": { |
| 646 | "-1": "Fails", |
| 647 | " 0": "No score", |
| 648 | "+1": "Verified" |
| 649 | } |
| 650 | }, |
| 651 | "Code-Review": { |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 652 | "disliked": { |
| 653 | "_account_id": 1000096, |
| 654 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 655 | "email": "john.doe@example.com", |
| 656 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 657 | }, |
| 658 | "all": [ |
| 659 | { |
| 660 | "value": -1, |
| 661 | "_account_id": 1000096, |
| 662 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 663 | "email": "john.doe@example.com", |
| 664 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 665 | }, |
| 666 | { |
| 667 | "value": 1, |
| 668 | "_account_id": 1000097, |
| 669 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 670 | "email": "jane.roe@example.com", |
| 671 | "username": "jroe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 672 | } |
| 673 | ] |
| 674 | "values": { |
Paul Fertser | 2474e52 | 2014-01-23 10:00:59 +0400 | [diff] [blame] | 675 | "-2": "This shall not be merged", |
| 676 | "-1": "I would prefer this is not merged as is", |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 677 | " 0": "No score", |
| 678 | "+1": "Looks good to me, but someone else must approve", |
| 679 | "+2": "Looks good to me, approved" |
| 680 | } |
| 681 | } |
| 682 | }, |
| 683 | "permitted_labels": { |
| 684 | "Verified": [ |
| 685 | "-1", |
| 686 | " 0", |
| 687 | "+1" |
| 688 | ], |
| 689 | "Code-Review": [ |
| 690 | "-2", |
| 691 | "-1", |
| 692 | " 0", |
| 693 | "+1", |
| 694 | "+2" |
| 695 | ] |
| 696 | }, |
| 697 | "removable_reviewers": [ |
| 698 | { |
| 699 | "_account_id": 1000096, |
| 700 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 701 | "email": "john.doe@example.com", |
| 702 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 703 | }, |
| 704 | { |
| 705 | "_account_id": 1000097, |
| 706 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 707 | "email": "jane.roe@example.com", |
| 708 | "username": "jroe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 709 | } |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 710 | ], |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 711 | "reviewers": { |
| 712 | "REVIEWER": [ |
| 713 | { |
| 714 | "_account_id": 1000096, |
| 715 | "name": "John Doe", |
| 716 | "email": "john.doe@example.com", |
| 717 | "username": "jdoe" |
| 718 | }, |
| 719 | { |
| 720 | "_account_id": 1000097, |
| 721 | "name": "Jane Roe", |
| 722 | "email": "jane.roe@example.com", |
| 723 | "username": "jroe" |
| 724 | } |
| 725 | ] |
| 726 | }, |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 727 | "reviewer_updates": [ |
| 728 | { |
| 729 | "state": "REVIEWER", |
| 730 | "reviewer": { |
| 731 | "_account_id": 1000096, |
| 732 | "name": "John Doe", |
| 733 | "email": "john.doe@example.com", |
| 734 | "username": "jdoe" |
| 735 | }, |
| 736 | "updated_by": { |
| 737 | "_account_id": 1000096, |
| 738 | "name": "John Doe", |
| 739 | "email": "john.doe@example.com", |
| 740 | "username": "jdoe" |
| 741 | }, |
| 742 | "updated": "2016-07-21 20:12:39.000000000" |
| 743 | }, |
| 744 | { |
| 745 | "state": "REMOVED", |
| 746 | "reviewer": { |
| 747 | "_account_id": 1000096, |
| 748 | "name": "John Doe", |
| 749 | "email": "john.doe@example.com", |
| 750 | "username": "jdoe" |
| 751 | }, |
| 752 | "updated_by": { |
| 753 | "_account_id": 1000096, |
| 754 | "name": "John Doe", |
| 755 | "email": "john.doe@example.com", |
| 756 | "username": "jdoe" |
| 757 | }, |
| 758 | "updated": "2016-07-21 20:12:33.000000000" |
| 759 | }, |
| 760 | { |
| 761 | "state": "CC", |
| 762 | "reviewer": { |
| 763 | "_account_id": 1000096, |
| 764 | "name": "John Doe", |
| 765 | "email": "john.doe@example.com", |
| 766 | "username": "jdoe" |
| 767 | }, |
| 768 | "updated_by": { |
| 769 | "_account_id": 1000096, |
| 770 | "name": "John Doe", |
| 771 | "email": "john.doe@example.com", |
| 772 | "username": "jdoe" |
| 773 | }, |
| 774 | "updated": "2016-03-23 21:34:02.419000000", |
| 775 | }, |
| 776 | ], |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 777 | "messages": [ |
| 778 | { |
| 779 | "id": "YH-egE", |
| 780 | "author": { |
| 781 | "_account_id": 1000096, |
| 782 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 783 | "email": "john.doe@example.com", |
| 784 | "username": "jdoe" |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 785 | }, |
| 786 | "updated": "2013-03-23 21:34:02.419000000", |
| 787 | "message": "Patch Set 1:\n\nThis is the first message.", |
| 788 | "revision_number": 1 |
| 789 | }, |
| 790 | { |
| 791 | "id": "WEEdhU", |
| 792 | "author": { |
| 793 | "_account_id": 1000097, |
| 794 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 795 | "email": "jane.roe@example.com", |
| 796 | "username": "jroe" |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 797 | }, |
| 798 | "updated": "2013-03-23 21:36:52.332000000", |
| 799 | "message": "Patch Set 1:\n\nThis is the second message.\n\nWith a line break.", |
| 800 | "revision_number": 1 |
| 801 | } |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 802 | ] |
| 803 | } |
| 804 | ---- |
| 805 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 806 | [[get-topic]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 807 | === Get Topic |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 808 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 809 | 'GET /changes/link:#change-id[\{change-id\}]/topic' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 810 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 811 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 812 | Retrieves the topic of a change. |
| 813 | |
| 814 | .Request |
| 815 | ---- |
| 816 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0 |
| 817 | ---- |
| 818 | |
| 819 | .Response |
| 820 | ---- |
| 821 | HTTP/1.1 200 OK |
| 822 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 823 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 824 | |
| 825 | )]}' |
| 826 | "Documentation" |
| 827 | ---- |
| 828 | |
| 829 | If the change does not have a topic an empty string is returned. |
| 830 | |
| 831 | [[set-topic]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 832 | === Set Topic |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 833 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 834 | 'PUT /changes/link:#change-id[\{change-id\}]/topic' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 835 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 836 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 837 | Sets the topic of a change. |
| 838 | |
| 839 | The new topic must be provided in the request body inside a |
| 840 | link:#topic-input[TopicInput] entity. |
| 841 | |
| 842 | .Request |
| 843 | ---- |
| 844 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 845 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 846 | |
| 847 | { |
| 848 | "topic": "Documentation" |
| 849 | } |
| 850 | ---- |
| 851 | |
| 852 | As response the new topic is returned. |
| 853 | |
| 854 | .Response |
| 855 | ---- |
| 856 | HTTP/1.1 200 OK |
| 857 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 858 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 859 | |
| 860 | )]}' |
| 861 | "Documentation" |
| 862 | ---- |
| 863 | |
| 864 | If the topic was deleted the response is "`204 No Content`". |
| 865 | |
| 866 | [[delete-topic]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 867 | === Delete Topic |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 868 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 869 | 'DELETE /changes/link:#change-id[\{change-id\}]/topic' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 870 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 871 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 872 | Deletes the topic of a change. |
| 873 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 874 | Please note that some proxies prohibit request bodies for DELETE |
| 875 | requests. In this case, if you want to specify a commit message, use |
| 876 | link:#set-topic[PUT] to delete the topic. |
| 877 | |
| 878 | .Request |
| 879 | ---- |
| 880 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0 |
| 881 | ---- |
| 882 | |
| 883 | .Response |
| 884 | ---- |
| 885 | HTTP/1.1 204 No Content |
| 886 | ---- |
| 887 | |
Sven Selberg | 273a4aa | 2016-09-21 16:28:10 +0200 | [diff] [blame] | 888 | [[get-assignee]] |
| 889 | === Get Assignee |
| 890 | -- |
| 891 | 'GET /changes/link:#change-id[\{change-id\}]/assignee' |
| 892 | -- |
| 893 | |
| 894 | Retrieves the account of the user assigned to a change. |
| 895 | |
| 896 | .Request |
| 897 | ---- |
| 898 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/assignee HTTP/1.0 |
| 899 | ---- |
| 900 | |
| 901 | As a response an link:rest-api-accounts.html#account-info[AccountInfo] entity |
| 902 | describing the assigned account is returned. |
| 903 | |
| 904 | .Response |
| 905 | ---- |
| 906 | HTTP/1.1 200 OK |
| 907 | Content-Disposition: attachment |
| 908 | Content-Type: application/json; charset=UTF-8 |
| 909 | |
| 910 | )]}' |
| 911 | { |
| 912 | "_account_id": 1000096, |
| 913 | "name": "John Doe", |
| 914 | "email": "john.doe@example.com", |
| 915 | "username": "jdoe" |
| 916 | } |
| 917 | ---- |
| 918 | |
| 919 | If the change has no assignee the response is "`204 No Content`". |
| 920 | |
| 921 | [[get-past-assignees]] |
| 922 | === Get Past Assignees |
| 923 | -- |
| 924 | 'GET /changes/link:#change-id[\{change-id\}]/past_assignees' |
| 925 | -- |
| 926 | |
| 927 | Returns a list of every user ever assigned to a change, in the order in which |
| 928 | they were first assigned. |
| 929 | |
| 930 | .Request |
| 931 | ---- |
| 932 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/past_assignees HTTP/1.0 |
| 933 | ---- |
| 934 | |
| 935 | As a response a list of link:rest-api-accounts.html#account-info[AccountInfo] |
| 936 | entities is returned. |
| 937 | |
| 938 | .Response |
| 939 | ---- |
| 940 | HTTP/1.1 200 OK |
| 941 | Content-Disposition: attachment |
| 942 | Content-Type: application/json; charset=UTF-8 |
| 943 | |
| 944 | )]}' |
| 945 | [ |
| 946 | { |
| 947 | "_account_id": 1000051, |
| 948 | "name": "Jane Doe", |
| 949 | "email": "jane.doe@example.com", |
| 950 | "username": "janed" |
| 951 | }, |
| 952 | { |
| 953 | "_account_id": 1000096, |
| 954 | "name": "John Doe", |
| 955 | "email": "john.doe@example.com", |
| 956 | "username": "jdoe" |
| 957 | } |
| 958 | ] |
| 959 | |
| 960 | ---- |
| 961 | |
| 962 | |
| 963 | [[set-assignee]] |
| 964 | === Set Assignee |
| 965 | -- |
| 966 | 'PUT /changes/link:#change-id[\{change-id\}]/assignee' |
| 967 | -- |
| 968 | |
| 969 | Sets the assignee of a change. |
| 970 | |
| 971 | The new assignee must be provided in the request body inside a |
| 972 | link:#assignee-input[AssigneeInput] entity. |
| 973 | |
| 974 | .Request |
| 975 | ---- |
| 976 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/assignee HTTP/1.0 |
| 977 | Content-Type: application/json; charset=UTF-8 |
| 978 | |
| 979 | { |
| 980 | "assignee": "jdoe" |
| 981 | } |
| 982 | ---- |
| 983 | |
| 984 | As a response an link:rest-api-accounts.html#account-info[AccountInfo] entity |
| 985 | describing the assigned account is returned. |
| 986 | |
| 987 | .Response |
| 988 | ---- |
| 989 | HTTP/1.1 200 OK |
| 990 | Content-Disposition: attachment |
| 991 | Content-Type: application/json; charset=UTF-8 |
| 992 | |
| 993 | )]}' |
| 994 | { |
| 995 | "_account_id": 1000096, |
| 996 | "name": "John Doe", |
| 997 | "email": "john.doe@example.com", |
| 998 | "username": "jdoe" |
| 999 | } |
| 1000 | ---- |
| 1001 | |
| 1002 | [[delete-assignee]] |
| 1003 | === Delete Assignee |
| 1004 | -- |
| 1005 | 'DELETE /changes/link:#change-id[\{change-id\}]/assignee' |
| 1006 | -- |
| 1007 | |
| 1008 | Deletes the assignee of a change. |
| 1009 | |
| 1010 | |
| 1011 | .Request |
| 1012 | ---- |
| 1013 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/assignee HTTP/1.0 |
| 1014 | ---- |
| 1015 | |
| 1016 | As a response an link:rest-api-accounts.html#account-info[AccountInfo] entity |
| 1017 | describing the account of the deleted assignee is returned. |
| 1018 | |
| 1019 | .Response |
| 1020 | ---- |
| 1021 | HTTP/1.1 200 OK |
| 1022 | Content-Disposition: attachment |
| 1023 | Content-Type: application/json; charset=UTF-8 |
| 1024 | |
| 1025 | )]}' |
| 1026 | { |
| 1027 | "_account_id": 1000096, |
| 1028 | "name": "John Doe", |
| 1029 | "email": "john.doe@example.com", |
| 1030 | "username": "jdoe" |
| 1031 | } |
| 1032 | ---- |
| 1033 | |
| 1034 | If the change had no assignee the response is "`204 No Content`". |
| 1035 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1036 | [[abandon-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1037 | === Abandon Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1038 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1039 | 'POST /changes/link:#change-id[\{change-id\}]/abandon' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1040 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1041 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1042 | Abandons a change. |
| 1043 | |
| 1044 | The request body does not need to include a link:#abandon-input[ |
| 1045 | AbandonInput] entity if no review comment is added. |
| 1046 | |
| 1047 | .Request |
| 1048 | ---- |
| 1049 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/abandon HTTP/1.0 |
| 1050 | ---- |
| 1051 | |
| 1052 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1053 | describes the abandoned change. |
| 1054 | |
| 1055 | .Response |
| 1056 | ---- |
| 1057 | HTTP/1.1 200 OK |
| 1058 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1059 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1060 | |
| 1061 | )]}' |
| 1062 | { |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1063 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1064 | "project": "myProject", |
| 1065 | "branch": "master", |
| 1066 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1067 | "subject": "Implementing Feature X", |
| 1068 | "status": "ABANDONED", |
| 1069 | "created": "2013-02-01 09:59:32.126000000", |
| 1070 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1071 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1072 | "insertions": 3, |
| 1073 | "deletions": 310, |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1074 | "_number": 3965, |
| 1075 | "owner": { |
| 1076 | "name": "John Doe" |
| 1077 | } |
| 1078 | } |
| 1079 | ---- |
| 1080 | |
| 1081 | If the change cannot be abandoned because the change state doesn't |
| 1082 | allow abandoning of the change, the response is "`409 Conflict`" and |
| 1083 | the error message is contained in the response body. |
| 1084 | |
| 1085 | .Response |
| 1086 | ---- |
| 1087 | HTTP/1.1 409 Conflict |
| 1088 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1089 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1090 | |
| 1091 | change is merged |
| 1092 | ---- |
| 1093 | |
| 1094 | [[restore-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1095 | === Restore Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1096 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1097 | 'POST /changes/link:#change-id[\{change-id\}]/restore' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1098 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1099 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1100 | Restores a change. |
| 1101 | |
| 1102 | The request body does not need to include a link:#restore-input[ |
| 1103 | RestoreInput] entity if no review comment is added. |
| 1104 | |
| 1105 | .Request |
| 1106 | ---- |
| 1107 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/restore HTTP/1.0 |
| 1108 | ---- |
| 1109 | |
| 1110 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1111 | describes the restored change. |
| 1112 | |
| 1113 | .Response |
| 1114 | ---- |
| 1115 | HTTP/1.1 200 OK |
| 1116 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1117 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1118 | |
| 1119 | )]}' |
| 1120 | { |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1121 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1122 | "project": "myProject", |
| 1123 | "branch": "master", |
| 1124 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1125 | "subject": "Implementing Feature X", |
| 1126 | "status": "NEW", |
| 1127 | "created": "2013-02-01 09:59:32.126000000", |
| 1128 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1129 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1130 | "insertions": 2, |
| 1131 | "deletions": 13, |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1132 | "_number": 3965, |
| 1133 | "owner": { |
| 1134 | "name": "John Doe" |
| 1135 | } |
| 1136 | } |
| 1137 | ---- |
| 1138 | |
| 1139 | If the change cannot be restored because the change state doesn't |
| 1140 | allow restoring the change, the response is "`409 Conflict`" and |
| 1141 | the error message is contained in the response body. |
| 1142 | |
| 1143 | .Response |
| 1144 | ---- |
| 1145 | HTTP/1.1 409 Conflict |
| 1146 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1147 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1148 | |
| 1149 | change is new |
| 1150 | ---- |
| 1151 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1152 | [[rebase-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1153 | === Rebase Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1154 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1155 | 'POST /changes/link:#change-id[\{change-id\}]/rebase' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1156 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1157 | |
| 1158 | Rebases a change. |
| 1159 | |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 1160 | Optionally, the parent revision can be changed to another patch set through the |
| 1161 | link:#rebase-input[RebaseInput] entity. |
| 1162 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1163 | .Request |
| 1164 | ---- |
| 1165 | POST /changes/myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2/rebase HTTP/1.0 |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 1166 | Content-Type: application/json;charset=UTF-8 |
| 1167 | |
| 1168 | { |
| 1169 | "base" : "1234", |
| 1170 | } |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1171 | ---- |
| 1172 | |
| 1173 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1174 | describes the rebased change. Information about the current patch set |
| 1175 | is included. |
| 1176 | |
| 1177 | .Response |
| 1178 | ---- |
| 1179 | HTTP/1.1 200 OK |
| 1180 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1181 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1182 | |
| 1183 | )]}' |
| 1184 | { |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1185 | "id": "myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 1186 | "project": "myProject", |
| 1187 | "branch": "master", |
| 1188 | "change_id": "I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 1189 | "subject": "Implement Feature X", |
| 1190 | "status": "NEW", |
| 1191 | "created": "2013-02-01 09:59:32.126000000", |
| 1192 | "updated": "2013-02-21 11:16:36.775000000", |
| 1193 | "mergeable": false, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1194 | "insertions": 33, |
| 1195 | "deletions": 9, |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1196 | "_number": 4799, |
| 1197 | "owner": { |
| 1198 | "name": "John Doe" |
| 1199 | }, |
| 1200 | "current_revision": "27cc4558b5a3d3387dd11ee2df7a117e7e581822", |
| 1201 | "revisions": { |
| 1202 | "27cc4558b5a3d3387dd11ee2df7a117e7e581822": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 1203 | "kind": "REWORK", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1204 | "_number": 2, |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 1205 | "ref": "refs/changes/99/4799/2", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1206 | "fetch": { |
| 1207 | "http": { |
| 1208 | "url": "http://gerrit:8080/myProject", |
| 1209 | "ref": "refs/changes/99/4799/2" |
| 1210 | } |
| 1211 | }, |
| 1212 | "commit": { |
| 1213 | "parents": [ |
| 1214 | { |
| 1215 | "commit": "b4003890dadd406d80222bf1ad8aca09a4876b70", |
| 1216 | "subject": "Implement Feature A" |
| 1217 | } |
Yuxuan Wang | cc598ac | 2016-07-12 17:11:05 +0000 | [diff] [blame] | 1218 | ], |
| 1219 | "author": { |
| 1220 | "name": "John Doe", |
| 1221 | "email": "john.doe@example.com", |
| 1222 | "date": "2013-05-07 15:21:27.000000000", |
| 1223 | "tz": 120 |
| 1224 | }, |
| 1225 | "committer": { |
| 1226 | "name": "Gerrit Code Review", |
| 1227 | "email": "gerrit-server@example.com", |
| 1228 | "date": "2013-05-07 15:35:43.000000000", |
| 1229 | "tz": 120 |
| 1230 | }, |
| 1231 | "subject": "Implement Feature X", |
| 1232 | "message": "Implement Feature X\n\nAdded feature X." |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1233 | } |
| 1234 | } |
| 1235 | } |
| 1236 | ---- |
| 1237 | |
| 1238 | If the change cannot be rebased, e.g. due to conflicts, the response is |
| 1239 | "`409 Conflict`" and the error message is contained in the response |
| 1240 | body. |
| 1241 | |
| 1242 | .Response |
| 1243 | ---- |
| 1244 | HTTP/1.1 409 Conflict |
| 1245 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1246 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1247 | |
| 1248 | The change could not be rebased due to a path conflict during merge. |
| 1249 | ---- |
| 1250 | |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 1251 | [[move-change]] |
| 1252 | === Move Change |
| 1253 | -- |
| 1254 | 'POST /changes/link:#change-id[\{change-id\}]/move' |
| 1255 | -- |
| 1256 | |
| 1257 | Move a change. |
| 1258 | |
| 1259 | The destination branch must be provided in the request body inside a |
| 1260 | link:#move-input[MoveInput] entity. |
| 1261 | |
| 1262 | .Request |
| 1263 | ---- |
| 1264 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/move HTTP/1.0 |
| 1265 | Content-Type: application/json; charset=UTF-8 |
| 1266 | |
| 1267 | { |
| 1268 | "destination_branch" : "release-branch" |
| 1269 | } |
| 1270 | |
| 1271 | ---- |
| 1272 | |
| 1273 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1274 | describes the moved change. |
| 1275 | |
| 1276 | .Response |
| 1277 | ---- |
| 1278 | HTTP/1.1 200 OK |
| 1279 | Content-Disposition: attachment |
| 1280 | Content-Type: application/json; charset=UTF-8 |
| 1281 | |
| 1282 | )]}' |
| 1283 | { |
| 1284 | "id": "myProject~release-branch~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1285 | "project": "myProject", |
| 1286 | "branch": "release-branch", |
| 1287 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1288 | "subject": "Implementing Feature X", |
| 1289 | "status": "NEW", |
| 1290 | "created": "2013-02-01 09:59:32.126000000", |
| 1291 | "updated": "2013-02-21 11:16:36.775000000", |
| 1292 | "mergeable": true, |
| 1293 | "insertions": 2, |
| 1294 | "deletions": 13, |
| 1295 | "_number": 3965, |
| 1296 | "owner": { |
| 1297 | "name": "John Doe" |
| 1298 | } |
| 1299 | } |
| 1300 | ---- |
| 1301 | |
| 1302 | If the change cannot be moved because the change state doesn't |
| 1303 | allow moving the change, the response is "`409 Conflict`" and |
| 1304 | the error message is contained in the response body. |
| 1305 | |
| 1306 | .Response |
| 1307 | ---- |
| 1308 | HTTP/1.1 409 Conflict |
| 1309 | Content-Disposition: attachment |
| 1310 | Content-Type: text/plain; charset=UTF-8 |
| 1311 | |
| 1312 | change is merged |
| 1313 | ---- |
| 1314 | |
| 1315 | If the change cannot be moved because the user doesn't have |
| 1316 | abandon permission on the change or upload permission on the destination, |
| 1317 | the response is "`409 Conflict`" and the error message is contained in the |
| 1318 | response body. |
| 1319 | |
| 1320 | .Response |
| 1321 | ---- |
| 1322 | HTTP/1.1 409 Conflict |
| 1323 | Content-Disposition: attachment |
| 1324 | Content-Type: text/plain; charset=UTF-8 |
| 1325 | |
| 1326 | move not permitted |
| 1327 | ---- |
| 1328 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1329 | [[revert-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1330 | === Revert Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1331 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1332 | 'POST /changes/link:#change-id[\{change-id\}]/revert' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1333 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1334 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1335 | Reverts a change. |
| 1336 | |
| 1337 | The request body does not need to include a link:#revert-input[ |
| 1338 | RevertInput] entity if no review comment is added. |
| 1339 | |
| 1340 | .Request |
| 1341 | ---- |
Michael Zhou | 1027049 | 2016-03-24 22:35:40 -0400 | [diff] [blame] | 1342 | POST /changes/myProject~master~I1ffe09a505e25f15ce1521bcfb222e51e62c2a14/revert HTTP/1.0 |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1343 | ---- |
| 1344 | |
| 1345 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1346 | describes the reverting change. |
| 1347 | |
| 1348 | .Response |
| 1349 | ---- |
| 1350 | HTTP/1.1 200 OK |
| 1351 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1352 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1353 | |
| 1354 | )]}' |
| 1355 | { |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1356 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1357 | "project": "myProject", |
| 1358 | "branch": "master", |
| 1359 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1360 | "subject": "Revert \"Implementing Feature X\"", |
| 1361 | "status": "NEW", |
| 1362 | "created": "2013-02-01 09:59:32.126000000", |
| 1363 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1364 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1365 | "insertions": 6, |
| 1366 | "deletions": 4, |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1367 | "_number": 3965, |
| 1368 | "owner": { |
| 1369 | "name": "John Doe" |
| 1370 | } |
| 1371 | } |
| 1372 | ---- |
| 1373 | |
| 1374 | If the change cannot be reverted because the change state doesn't |
| 1375 | allow reverting the change, the response is "`409 Conflict`" and |
| 1376 | the error message is contained in the response body. |
| 1377 | |
| 1378 | .Response |
| 1379 | ---- |
| 1380 | HTTP/1.1 409 Conflict |
| 1381 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1382 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1383 | |
| 1384 | change is new |
| 1385 | ---- |
| 1386 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1387 | [[submit-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1388 | === Submit Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1389 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1390 | 'POST /changes/link:#change-id[\{change-id\}]/submit' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1391 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1392 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1393 | Submits a change. |
| 1394 | |
| 1395 | The request body only needs to include a link:#submit-input[ |
David Pursehouse | a8f48f8 | 2016-03-10 15:27:47 +0900 | [diff] [blame] | 1396 | SubmitInput] entity if submitting on behalf of another user. |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1397 | |
| 1398 | .Request |
| 1399 | ---- |
| 1400 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/submit HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1401 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1402 | |
| 1403 | { |
David Pursehouse | a8f48f8 | 2016-03-10 15:27:47 +0900 | [diff] [blame] | 1404 | "on_behalf_of": 1001439 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1405 | } |
| 1406 | ---- |
| 1407 | |
| 1408 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1409 | describes the submitted/merged change. |
| 1410 | |
| 1411 | .Response |
| 1412 | ---- |
| 1413 | HTTP/1.1 200 OK |
| 1414 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1415 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1416 | |
| 1417 | )]}' |
| 1418 | { |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1419 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1420 | "project": "myProject", |
| 1421 | "branch": "master", |
| 1422 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1423 | "subject": "Implementing Feature X", |
| 1424 | "status": "MERGED", |
| 1425 | "created": "2013-02-01 09:59:32.126000000", |
| 1426 | "updated": "2013-02-21 11:16:36.775000000", |
Khai Do | 96a7caf | 2016-01-07 14:07:54 -0800 | [diff] [blame] | 1427 | "submitted": "2013-02-21 11:16:36.615000000", |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1428 | "_number": 3965, |
| 1429 | "owner": { |
| 1430 | "name": "John Doe" |
| 1431 | } |
| 1432 | } |
| 1433 | ---- |
| 1434 | |
| 1435 | If the change cannot be submitted because the submit rule doesn't allow |
| 1436 | submitting the change, the response is "`409 Conflict`" and the error |
| 1437 | message is contained in the response body. |
| 1438 | |
| 1439 | .Response |
| 1440 | ---- |
| 1441 | HTTP/1.1 409 Conflict |
| 1442 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1443 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1444 | |
| 1445 | blocked by Verified |
| 1446 | ---- |
| 1447 | |
David Pursehouse | 025c1af | 2015-11-20 17:02:50 +0900 | [diff] [blame] | 1448 | [[submitted-together]] |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1449 | === Changes Submitted Together |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1450 | -- |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1451 | 'GET /changes/link:#change-id[\{change-id\}]/submitted_together?o=NON_VISIBLE_CHANGES' |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1452 | -- |
| 1453 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1454 | Computes list of all changes which are submitted when |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1455 | link:#submit-change[Submit] is called for this change, |
Stefan Beller | 460f354 | 2015-07-20 14:10:41 -0700 | [diff] [blame] | 1456 | including the current change itself. |
| 1457 | |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1458 | The list consists of: |
| 1459 | |
| 1460 | * The given change. |
| 1461 | * If link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] |
| 1462 | is enabled, include all open changes with the same topic. |
| 1463 | * For each change whose submit type is not CHERRY_PICK, include unmerged |
| 1464 | ancestors targeting the same branch. |
| 1465 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1466 | As a special case, the list is empty if this change would be |
| 1467 | submitted by itself (without other changes). |
| 1468 | |
| 1469 | .Request |
| 1470 | ---- |
| 1471 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/submitted_together?o=NON_VISIBLE_CHANGES HTTP/1.0 |
| 1472 | Content-Type: application/json; charset=UTF-8 |
| 1473 | ---- |
| 1474 | |
| 1475 | As a response a link:#submitted-together-info[SubmittedTogetherInfo] |
| 1476 | entity is returned that describes what would happen if the change were |
| 1477 | submitted. This response contains a list of changes and a count of |
| 1478 | changes that are not visible to the caller that are part of the set of |
| 1479 | changes to be merged. |
| 1480 | |
| 1481 | The listed changes use the same format as in |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1482 | link:#list-changes[Query Changes] with the |
| 1483 | link:#labels[`LABELS`], link:#detailed-labels[`DETAILED_LABELS`], |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 1484 | link:#current-revision[`CURRENT_REVISION`], |
| 1485 | link:#current-commit[`CURRENT_COMMIT`], and |
| 1486 | link:#submittable[`SUBMITTABLE`] options set. |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1487 | |
Shawn Pearce | 8080c3d | 2016-09-19 19:15:04 -0700 | [diff] [blame] | 1488 | Standard link:#query-options[formatting options] can be specified |
| 1489 | with the `o` parameter, as well as the `submitted_together` specific |
| 1490 | option `NON_VISIBLE_CHANGES`. |
| 1491 | |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1492 | .Response |
| 1493 | ---- |
| 1494 | HTTP/1.1 200 OK |
| 1495 | Content-Disposition: attachment |
| 1496 | Content-Type: application/json; charset=UTF-8 |
| 1497 | |
| 1498 | )]}' |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1499 | { |
| 1500 | "changes": [ |
| 1501 | { |
| 1502 | "id": "gerrit~master~I1ffe09a505e25f15ce1521bcfb222e51e62c2a14", |
| 1503 | "project": "gerrit", |
| 1504 | "branch": "master", |
| 1505 | "hashtags": [], |
| 1506 | "change_id": "I1ffe09a505e25f15ce1521bcfb222e51e62c2a14", |
| 1507 | "subject": "ChangeMergeQueue: Rewrite such that it works on set of changes", |
| 1508 | "status": "NEW", |
| 1509 | "created": "2015-05-01 15:39:57.979000000", |
| 1510 | "updated": "2015-05-20 19:25:21.592000000", |
| 1511 | "mergeable": true, |
| 1512 | "insertions": 303, |
| 1513 | "deletions": 210, |
| 1514 | "_number": 1779, |
| 1515 | "owner": { |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1516 | "_account_id": 1000000 |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1517 | }, |
| 1518 | "labels": { |
| 1519 | "Code-Review": { |
| 1520 | "approved": { |
| 1521 | "_account_id": 1000000 |
| 1522 | }, |
| 1523 | "all": [ |
| 1524 | { |
| 1525 | "value": 2, |
| 1526 | "date": "2015-05-20 19:25:21.592000000", |
| 1527 | "_account_id": 1000000 |
| 1528 | } |
| 1529 | ], |
| 1530 | "values": { |
| 1531 | "-2": "This shall not be merged", |
| 1532 | "-1": "I would prefer this is not merged as is", |
| 1533 | " 0": "No score", |
| 1534 | "+1": "Looks good to me, but someone else must approve", |
| 1535 | "+2": "Looks good to me, approved" |
| 1536 | }, |
| 1537 | "default_value": 0 |
| 1538 | }, |
| 1539 | "Verified": { |
| 1540 | "approved": { |
| 1541 | "_account_id": 1000000 |
| 1542 | }, |
| 1543 | "all": [ |
| 1544 | { |
| 1545 | "value": 1, |
| 1546 | "date": "2015-05-20 19:25:21.592000000", |
| 1547 | "_account_id": 1000000 |
| 1548 | } |
| 1549 | ], |
| 1550 | "values": { |
| 1551 | "-1": "Fails", |
| 1552 | " 0": "No score", |
| 1553 | "+1": "Verified" |
| 1554 | }, |
| 1555 | "default_value": 0 |
| 1556 | } |
| 1557 | }, |
| 1558 | "permitted_labels": { |
| 1559 | "Code-Review": [ |
| 1560 | "-2", |
| 1561 | "-1", |
| 1562 | " 0", |
| 1563 | "+1", |
| 1564 | "+2" |
| 1565 | ], |
| 1566 | "Verified": [ |
| 1567 | "-1", |
| 1568 | " 0", |
| 1569 | "+1" |
| 1570 | ] |
| 1571 | }, |
| 1572 | "removable_reviewers": [ |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 1573 | { |
| 1574 | "_account_id": 1000000 |
| 1575 | } |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1576 | ], |
| 1577 | "reviewers": { |
| 1578 | "REVIEWER": [ |
| 1579 | { |
| 1580 | "_account_id": 1000000 |
| 1581 | } |
| 1582 | ] |
| 1583 | }, |
| 1584 | "current_revision": "9adb9f4c7b40eeee0646e235de818d09164d7379", |
| 1585 | "revisions": { |
| 1586 | "9adb9f4c7b40eeee0646e235de818d09164d7379": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 1587 | "kind": "REWORK", |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1588 | "_number": 1, |
| 1589 | "created": "2015-05-01 15:39:57.979000000", |
| 1590 | "uploader": { |
| 1591 | "_account_id": 1000000 |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1592 | }, |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1593 | "ref": "refs/changes/79/1779/1", |
| 1594 | "fetch": {}, |
| 1595 | "commit": { |
| 1596 | "parents": [ |
| 1597 | { |
| 1598 | "commit": "2d3176497a2747faed075f163707e57d9f961a1c", |
| 1599 | "subject": "Merge changes from topic \u0027submodule-subscription-tests-and-fixes-3\u0027" |
| 1600 | } |
| 1601 | ], |
| 1602 | "author": { |
| 1603 | "name": "Stefan Beller", |
| 1604 | "email": "sbeller@google.com", |
| 1605 | "date": "2015-04-29 21:36:52.000000000", |
| 1606 | "tz": -420 |
| 1607 | }, |
| 1608 | "committer": { |
| 1609 | "name": "Stefan Beller", |
| 1610 | "email": "sbeller@google.com", |
| 1611 | "date": "2015-05-01 00:11:16.000000000", |
| 1612 | "tz": -420 |
| 1613 | }, |
| 1614 | "subject": "ChangeMergeQueue: Rewrite such that it works on set of changes", |
| 1615 | "message": "ChangeMergeQueue: Rewrite such that it works on set of changes\n\nChangeMergeQueue used to work on branches rather than sets of changes.\nThis change is a first step to merge sets of changes (e.g. grouped by a\ntopic and `changes.submitWholeTopic` enabled) in an atomic fashion.\nThis change doesn\u0027t aim to implement these changes, but only as a step\ntowards it.\n\nMergeOp keeps its functionality and behavior as is. A new class\nMergeOpMapper is introduced which will map the set of changes to\nthe set of branches. Additionally the MergeOpMapper is also\nresponsible for the threading done right now, which was part of\nthe ChangeMergeQueue before.\n\nChange-Id: I1ffe09a505e25f15ce1521bcfb222e51e62c2a14\n" |
| 1616 | } |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1617 | } |
| 1618 | } |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1619 | }, |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1620 | { |
| 1621 | "id": "gerrit~master~I7fe807e63792b3d26776fd1422e5e790a5697e22", |
| 1622 | "project": "gerrit", |
| 1623 | "branch": "master", |
| 1624 | "hashtags": [], |
| 1625 | "change_id": "I7fe807e63792b3d26776fd1422e5e790a5697e22", |
| 1626 | "subject": "AbstractSubmoduleSubscription: Split up createSubscription", |
| 1627 | "status": "NEW", |
| 1628 | "created": "2015-05-01 15:39:57.979000000", |
| 1629 | "updated": "2015-05-20 19:25:21.546000000", |
| 1630 | "mergeable": true, |
| 1631 | "insertions": 15, |
| 1632 | "deletions": 6, |
| 1633 | "_number": 1780, |
| 1634 | "owner": { |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1635 | "_account_id": 1000000 |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1636 | }, |
| 1637 | "labels": { |
| 1638 | "Code-Review": { |
| 1639 | "approved": { |
| 1640 | "_account_id": 1000000 |
| 1641 | }, |
| 1642 | "all": [ |
| 1643 | { |
| 1644 | "value": 2, |
| 1645 | "date": "2015-05-20 19:25:21.546000000", |
| 1646 | "_account_id": 1000000 |
| 1647 | } |
| 1648 | ], |
| 1649 | "values": { |
| 1650 | "-2": "This shall not be merged", |
| 1651 | "-1": "I would prefer this is not merged as is", |
| 1652 | " 0": "No score", |
| 1653 | "+1": "Looks good to me, but someone else must approve", |
| 1654 | "+2": "Looks good to me, approved" |
| 1655 | }, |
| 1656 | "default_value": 0 |
| 1657 | }, |
| 1658 | "Verified": { |
| 1659 | "approved": { |
| 1660 | "_account_id": 1000000 |
| 1661 | }, |
| 1662 | "all": [ |
| 1663 | { |
| 1664 | "value": 1, |
| 1665 | "date": "2015-05-20 19:25:21.546000000", |
| 1666 | "_account_id": 1000000 |
| 1667 | } |
| 1668 | ], |
| 1669 | "values": { |
| 1670 | "-1": "Fails", |
| 1671 | " 0": "No score", |
| 1672 | "+1": "Verified" |
| 1673 | }, |
| 1674 | "default_value": 0 |
| 1675 | } |
| 1676 | }, |
| 1677 | "permitted_labels": { |
| 1678 | "Code-Review": [ |
| 1679 | "-2", |
| 1680 | "-1", |
| 1681 | " 0", |
| 1682 | "+1", |
| 1683 | "+2" |
| 1684 | ], |
| 1685 | "Verified": [ |
| 1686 | "-1", |
| 1687 | " 0", |
| 1688 | "+1" |
| 1689 | ] |
| 1690 | }, |
| 1691 | "removable_reviewers": [ |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 1692 | { |
| 1693 | "_account_id": 1000000 |
| 1694 | } |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1695 | ], |
| 1696 | "reviewers": { |
| 1697 | "REVIEWER": [ |
| 1698 | { |
| 1699 | "_account_id": 1000000 |
| 1700 | } |
| 1701 | ] |
| 1702 | }, |
| 1703 | "current_revision": "1bd7c12a38854a2c6de426feec28800623f492c4", |
| 1704 | "revisions": { |
| 1705 | "1bd7c12a38854a2c6de426feec28800623f492c4": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 1706 | "kind": "REWORK", |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1707 | "_number": 1, |
| 1708 | "created": "2015-05-01 15:39:57.979000000", |
| 1709 | "uploader": { |
| 1710 | "_account_id": 1000000 |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1711 | }, |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1712 | "ref": "refs/changes/80/1780/1", |
| 1713 | "fetch": {}, |
| 1714 | "commit": { |
| 1715 | "parents": [ |
| 1716 | { |
| 1717 | "commit": "9adb9f4c7b40eeee0646e235de818d09164d7379", |
| 1718 | "subject": "ChangeMergeQueue: Rewrite such that it works on set of changes" |
| 1719 | } |
| 1720 | ], |
| 1721 | "author": { |
| 1722 | "name": "Stefan Beller", |
| 1723 | "email": "sbeller@google.com", |
| 1724 | "date": "2015-04-25 00:11:59.000000000", |
| 1725 | "tz": -420 |
| 1726 | }, |
| 1727 | "committer": { |
| 1728 | "name": "Stefan Beller", |
| 1729 | "email": "sbeller@google.com", |
| 1730 | "date": "2015-05-01 00:11:16.000000000", |
| 1731 | "tz": -420 |
| 1732 | }, |
| 1733 | "subject": "AbstractSubmoduleSubscription: Split up createSubscription", |
| 1734 | "message": "AbstractSubmoduleSubscription: Split up createSubscription\n\nLater we want to have subscriptions to more submodules, so we need to\nfind a way to add more submodule entries into the file. By splitting up\nthe createSubscription() method, that is very easy by using the\naddSubmoduleSubscription method multiple times.\n\nChange-Id: I7fe807e63792b3d26776fd1422e5e790a5697e22\n" |
| 1735 | } |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1736 | } |
| 1737 | } |
| 1738 | } |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1739 | ], |
| 1740 | "non_visible_changes": 0 |
| 1741 | } |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1742 | ---- |
| 1743 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1744 | If the `o=NON_VISIBLE_CHANGES` query parameter is not passed, then |
| 1745 | instead of a link:#submitted-together-info[SubmittedTogetherInfo] |
| 1746 | entity, the response is a list of changes, or a 403 response with a |
| 1747 | message if the set of changes to be submitted with this change |
| 1748 | includes changes the caller cannot read. |
| 1749 | |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1750 | |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1751 | [[publish-draft-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1752 | === Publish Draft Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1753 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1754 | 'POST /changes/link:#change-id[\{change-id\}]/publish' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1755 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1756 | |
| 1757 | Publishes a draft change. |
| 1758 | |
| 1759 | .Request |
| 1760 | ---- |
| 1761 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/publish HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1762 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1763 | ---- |
| 1764 | |
| 1765 | .Response |
| 1766 | ---- |
| 1767 | HTTP/1.1 204 No Content |
| 1768 | ---- |
| 1769 | |
Alice Kober-Sotzek | 31c8333 | 2016-10-19 14:23:03 +0200 | [diff] [blame] | 1770 | [[delete-change]] |
| 1771 | === Delete Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1772 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1773 | 'DELETE /changes/link:#change-id[\{change-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1774 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1775 | |
Alice Kober-Sotzek | 31c8333 | 2016-10-19 14:23:03 +0200 | [diff] [blame] | 1776 | Deletes a change. |
| 1777 | |
| 1778 | New or abandoned changes can only be deleted by administrators. The deletion of |
| 1779 | merged changes isn't supported at the moment. Draft changes can only be deleted |
| 1780 | by their owner or other users who have the permissions to view and delete |
| 1781 | drafts. If the draft workflow is disabled, only administrators with those |
| 1782 | permissions may delete draft changes. |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1783 | |
| 1784 | .Request |
| 1785 | ---- |
| 1786 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1787 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 1788 | ---- |
| 1789 | |
| 1790 | .Response |
| 1791 | ---- |
| 1792 | HTTP/1.1 204 No Content |
| 1793 | ---- |
| 1794 | |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 1795 | [[get-included-in]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1796 | === Get Included In |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1797 | -- |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 1798 | 'GET /changes/link:#change-id[\{change-id\}]/in' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1799 | -- |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 1800 | |
| 1801 | Retrieves the branches and tags in which a change is included. As result |
| 1802 | an link:#included-in-info[IncludedInInfo] entity is returned. |
| 1803 | |
| 1804 | .Request |
| 1805 | ---- |
| 1806 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/in HTTP/1.0 |
| 1807 | ---- |
| 1808 | |
| 1809 | .Response |
| 1810 | ---- |
| 1811 | HTTP/1.1 200 OK |
| 1812 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1813 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 1814 | |
| 1815 | )]}' |
| 1816 | { |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 1817 | "branches": [ |
| 1818 | "master" |
| 1819 | ], |
| 1820 | "tags": [] |
| 1821 | } |
| 1822 | ---- |
| 1823 | |
David Pursehouse | 4e38b97 | 2014-05-30 10:36:40 +0900 | [diff] [blame] | 1824 | [[index-change]] |
| 1825 | === Index Change |
| 1826 | -- |
| 1827 | 'POST /changes/link:#change-id[\{change-id\}]/index' |
| 1828 | -- |
| 1829 | |
| 1830 | Adds or updates the change in the secondary index. |
| 1831 | |
| 1832 | .Request |
| 1833 | ---- |
| 1834 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/index HTTP/1.0 |
| 1835 | ---- |
| 1836 | |
| 1837 | .Response |
| 1838 | ---- |
| 1839 | HTTP/1.1 204 No Content |
| 1840 | ---- |
| 1841 | |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 1842 | [[list-change-comments]] |
| 1843 | === List Change Comments |
| 1844 | -- |
| 1845 | 'GET /changes/link:#change-id[\{change-id\}]/comments' |
| 1846 | -- |
| 1847 | |
| 1848 | Lists the published comments of all revisions of the change. |
| 1849 | |
| 1850 | Returns a map of file paths to lists of link:#comment-info[CommentInfo] |
| 1851 | entries. The entries in the map are sorted by file path, and the |
| 1852 | comments for each path are sorted by patch set number. Each comment has |
| 1853 | the `patch_set` and `author` fields set. |
| 1854 | |
| 1855 | .Request |
| 1856 | ---- |
| 1857 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/comments HTTP/1.0 |
| 1858 | ---- |
| 1859 | |
| 1860 | .Response |
| 1861 | ---- |
| 1862 | HTTP/1.1 200 OK |
| 1863 | Content-Disposition: attachment |
| 1864 | Content-Type: application/json; charset=UTF-8 |
| 1865 | |
| 1866 | )]}' |
| 1867 | { |
| 1868 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 1869 | { |
| 1870 | "patch_set": 1, |
| 1871 | "id": "TvcXrmjM", |
| 1872 | "line": 23, |
| 1873 | "message": "[nit] trailing whitespace", |
| 1874 | "updated": "2013-02-26 15:40:43.986000000" |
| 1875 | "author": { |
| 1876 | "_account_id": 1000096, |
| 1877 | "name": "John Doe", |
| 1878 | "email": "john.doe@example.com" |
| 1879 | } |
| 1880 | }, |
| 1881 | { |
| 1882 | "patch_set": 2, |
| 1883 | "id": "TveXwFiA", |
| 1884 | "line": 49, |
| 1885 | "in_reply_to": "TfYX-Iuo", |
| 1886 | "message": "Done", |
| 1887 | "updated": "2013-02-26 15:40:45.328000000" |
| 1888 | "author": { |
| 1889 | "_account_id": 1000097, |
| 1890 | "name": "Jane Roe", |
| 1891 | "email": "jane.roe@example.com" |
| 1892 | } |
| 1893 | } |
| 1894 | ] |
| 1895 | } |
| 1896 | ---- |
| 1897 | |
| 1898 | [[list-change-drafts]] |
| 1899 | === List Change Drafts |
| 1900 | -- |
| 1901 | 'GET /changes/link:#change-id[\{change-id\}]/drafts' |
| 1902 | -- |
| 1903 | |
| 1904 | Lists the draft comments of all revisions of the change that belong to |
| 1905 | the calling user. |
| 1906 | |
| 1907 | Returns a map of file paths to lists of link:#comment-info[CommentInfo] |
| 1908 | entries. The entries in the map are sorted by file path, and the |
| 1909 | comments for each path are sorted by patch set number. Each comment has |
| 1910 | the `patch_set` field set, and no `author`. |
| 1911 | |
| 1912 | .Request |
| 1913 | ---- |
| 1914 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/drafts HTTP/1.0 |
| 1915 | ---- |
| 1916 | |
| 1917 | .Response |
| 1918 | ---- |
| 1919 | HTTP/1.1 200 OK |
| 1920 | Content-Disposition: attachment |
| 1921 | Content-Type: application/json; charset=UTF-8 |
| 1922 | |
| 1923 | )]}' |
| 1924 | { |
| 1925 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 1926 | { |
| 1927 | "patch_set": 1, |
| 1928 | "id": "TvcXrmjM", |
| 1929 | "line": 23, |
| 1930 | "message": "[nit] trailing whitespace", |
| 1931 | "updated": "2013-02-26 15:40:43.986000000" |
| 1932 | }, |
| 1933 | { |
| 1934 | "patch_set": 2, |
| 1935 | "id": "TveXwFiA", |
| 1936 | "line": 49, |
| 1937 | "in_reply_to": "TfYX-Iuo", |
| 1938 | "message": "Done", |
| 1939 | "updated": "2013-02-26 15:40:45.328000000" |
| 1940 | } |
| 1941 | ] |
| 1942 | } |
| 1943 | ---- |
| 1944 | |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 1945 | [[check-change]] |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1946 | === Check Change |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 1947 | -- |
| 1948 | 'GET /changes/link:#change-id[\{change-id\}]/check' |
| 1949 | -- |
| 1950 | |
| 1951 | Performs consistency checks on the change, and returns a |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 1952 | link:#change-info[ChangeInfo] entity with the `problems` field set to a |
| 1953 | list of link:#problem-info[ProblemInfo] entities. |
| 1954 | |
| 1955 | Depending on the type of problem, some fields not marked optional may be |
| 1956 | missing from the result. At least `id`, `project`, `branch`, and |
| 1957 | `_number` will be present. |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 1958 | |
| 1959 | .Request |
| 1960 | ---- |
| 1961 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/check HTTP/1.0 |
| 1962 | ---- |
| 1963 | |
| 1964 | .Response |
| 1965 | ---- |
| 1966 | HTTP/1.1 200 OK |
| 1967 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1968 | Content-Type: application/json; charset=UTF-8 |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 1969 | |
| 1970 | )]}' |
| 1971 | { |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 1972 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1973 | "project": "myProject", |
| 1974 | "branch": "master", |
| 1975 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1976 | "subject": "Implementing Feature X", |
| 1977 | "status": "NEW", |
| 1978 | "created": "2013-02-01 09:59:32.126000000", |
| 1979 | "updated": "2013-02-21 11:16:36.775000000", |
| 1980 | "mergeable": true, |
| 1981 | "insertions": 34, |
| 1982 | "deletions": 101, |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 1983 | "_number": 3965, |
| 1984 | "owner": { |
| 1985 | "name": "John Doe" |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 1986 | }, |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 1987 | "problems": [ |
| 1988 | { |
| 1989 | "message": "Current patch set 1 not found" |
| 1990 | } |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 1991 | ] |
| 1992 | } |
| 1993 | ---- |
| 1994 | |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 1995 | [[fix-change]] |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1996 | === Fix Change |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 1997 | -- |
| 1998 | 'POST /changes/link:#change-id[\{change-id\}]/check' |
| 1999 | -- |
| 2000 | |
| 2001 | Performs consistency checks on the change as with link:#check-change[GET |
| 2002 | /check], and additionally fixes any problems that can be fixed |
| 2003 | automatically. The returned field values reflect any fixes. |
| 2004 | |
Dave Borowitz | bad53ee | 2015-06-11 10:10:18 -0400 | [diff] [blame] | 2005 | Some fixes have options controlling their behavior, which can be set in the |
| 2006 | link:#fix-input[FixInput] entity body. |
| 2007 | |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2008 | Only the change owner, a project owner, or an administrator may fix changes. |
| 2009 | |
| 2010 | .Request |
| 2011 | ---- |
| 2012 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/check HTTP/1.0 |
| 2013 | ---- |
| 2014 | |
| 2015 | .Response |
| 2016 | ---- |
| 2017 | HTTP/1.1 200 OK |
| 2018 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2019 | Content-Type: application/json; charset=UTF-8 |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2020 | |
| 2021 | )]}' |
| 2022 | { |
| 2023 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2024 | "project": "myProject", |
| 2025 | "branch": "master", |
| 2026 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2027 | "subject": "Implementing Feature X", |
| 2028 | "status": "MERGED", |
| 2029 | "created": "2013-02-01 09:59:32.126000000", |
| 2030 | "updated": "2013-02-21 11:16:36.775000000", |
Khai Do | 96a7caf | 2016-01-07 14:07:54 -0800 | [diff] [blame] | 2031 | "submitted": "2013-02-21 11:16:36.615000000", |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2032 | "mergeable": true, |
| 2033 | "insertions": 34, |
| 2034 | "deletions": 101, |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2035 | "_number": 3965, |
| 2036 | "owner": { |
| 2037 | "name": "John Doe" |
| 2038 | }, |
| 2039 | "problems": [ |
| 2040 | { |
| 2041 | "message": "Current patch set 2 not found" |
| 2042 | }, |
| 2043 | { |
| 2044 | "message": "Patch set 1 (1eee2c9d8f352483781e772f35dc586a69ff5646) is merged into destination ref master (1eee2c9d8f352483781e772f35dc586a69ff5646), but change status is NEW", |
| 2045 | "status": FIXED, |
| 2046 | "outcome": "Marked change as merged" |
| 2047 | } |
| 2048 | ] |
| 2049 | } |
| 2050 | ---- |
| 2051 | |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 2052 | [[edit-endpoints]] |
| 2053 | == Change Edit Endpoints |
| 2054 | |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 2055 | [[get-edit-detail]] |
| 2056 | === Get Change Edit Details |
| 2057 | -- |
| 2058 | 'GET /changes/link:#change-id[\{change-id\}]/edit |
| 2059 | -- |
| 2060 | |
| 2061 | Retrieves a change edit details. |
| 2062 | |
| 2063 | .Request |
| 2064 | ---- |
| 2065 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
| 2066 | ---- |
| 2067 | |
| 2068 | As response an link:#edit-info[EditInfo] entity is returned that |
| 2069 | describes the change edit, or "`204 No Content`" when change edit doesn't |
| 2070 | exist for this change. Change edits are stored on special branches and there |
| 2071 | can be max one edit per user per change. Edits aren't tracked in the database. |
David Ostrovsky | 5d98e34 | 2014-08-01 09:23:28 +0200 | [diff] [blame] | 2072 | When request parameter `list` is provided the response also includes the file |
| 2073 | list. When `base` request parameter is provided the file list is computed |
David Ostrovsky | 5562fe5 | 2014-08-12 22:36:27 +0200 | [diff] [blame] | 2074 | against this base revision. When request parameter `download-commands` is |
| 2075 | provided fetch info map is also included. |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 2076 | |
| 2077 | .Response |
| 2078 | ---- |
| 2079 | HTTP/1.1 200 OK |
| 2080 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2081 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 2082 | |
| 2083 | )]}' |
| 2084 | { |
| 2085 | "commit":{ |
| 2086 | "parents":[ |
| 2087 | { |
| 2088 | "commit":"1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 2089 | } |
| 2090 | ], |
| 2091 | "author":{ |
| 2092 | "name":"Shawn O. Pearce", |
| 2093 | "email":"sop@google.com", |
| 2094 | "date":"2012-04-24 18:08:08.000000000", |
| 2095 | "tz":-420 |
| 2096 | }, |
| 2097 | "committer":{ |
| 2098 | "name":"Shawn O. Pearce", |
| 2099 | "email":"sop@google.com", |
| 2100 | "date":"2012-04-24 18:08:08.000000000", |
| 2101 | "tz":-420 |
| 2102 | }, |
| 2103 | "subject":"Use an EventBus to manage star icons", |
| 2104 | "message":"Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 2105 | }, |
Michael Zhou | d03fe28 | 2016-04-25 17:13:17 -0400 | [diff] [blame] | 2106 | "base_revision":"c35558e0925e6985c91f3a16921537d5e572b7a3" |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 2107 | } |
| 2108 | ---- |
David Pursehouse | 4e38b97 | 2014-05-30 10:36:40 +0900 | [diff] [blame] | 2109 | |
David Ostrovsky | a5ab829 | 2014-08-01 02:11:39 +0200 | [diff] [blame] | 2110 | [[put-edit-file]] |
| 2111 | === Change file content in Change Edit |
| 2112 | -- |
| 2113 | 'PUT /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile |
| 2114 | -- |
| 2115 | |
| 2116 | Put content of a file to a change edit. |
| 2117 | |
| 2118 | .Request |
| 2119 | ---- |
| 2120 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0 |
| 2121 | ---- |
| 2122 | |
| 2123 | When change edit doesn't exist for this change yet it is created. When file |
| 2124 | content isn't provided, it is wiped out for that file. As response |
| 2125 | "`204 No Content`" is returned. |
| 2126 | |
| 2127 | .Response |
| 2128 | ---- |
| 2129 | HTTP/1.1 204 No Content |
| 2130 | ---- |
| 2131 | |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 2132 | [[post-edit]] |
David Ostrovsky | a00c953 | 2015-01-21 00:17:49 +0100 | [diff] [blame] | 2133 | === Restore file content or rename files in Change Edit |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 2134 | -- |
| 2135 | 'POST /changes/link:#change-id[\{change-id\}]/edit |
| 2136 | -- |
| 2137 | |
David Ostrovsky | a00c953 | 2015-01-21 00:17:49 +0100 | [diff] [blame] | 2138 | Creates empty change edit, restores file content or renames files in change |
| 2139 | edit. The request body needs to include a |
| 2140 | link:#change-edit-input[ChangeEditInput] entity when a file within change |
| 2141 | edit should be restored or old and new file names to rename a file. |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 2142 | |
| 2143 | .Request |
| 2144 | ---- |
| 2145 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2146 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 2147 | |
| 2148 | { |
David Ostrovsky | bd12e17 | 2014-08-21 23:08:15 +0200 | [diff] [blame] | 2149 | "restore_path": "foo" |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 2150 | } |
| 2151 | ---- |
| 2152 | |
David Ostrovsky | a00c953 | 2015-01-21 00:17:49 +0100 | [diff] [blame] | 2153 | or for rename: |
| 2154 | |
| 2155 | .Request |
| 2156 | ---- |
| 2157 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
| 2158 | Content-Type: application/json; charset=UTF-8 |
| 2159 | |
| 2160 | { |
| 2161 | "old_path": "foo", |
| 2162 | "new_path": "bar" |
| 2163 | } |
| 2164 | ---- |
| 2165 | |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 2166 | When change edit doesn't exist for this change yet it is created. When path |
David Ostrovsky | a00c953 | 2015-01-21 00:17:49 +0100 | [diff] [blame] | 2167 | and restore flag are provided in request body, this file is restored. When |
| 2168 | old and new file names are provided, the file is renamed. As response |
| 2169 | "`204 No Content`" is returned. |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 2170 | |
| 2171 | .Response |
| 2172 | ---- |
| 2173 | HTTP/1.1 204 No Content |
| 2174 | ---- |
| 2175 | |
David Ostrovsky | c967e15 | 2014-10-24 17:36:16 +0200 | [diff] [blame] | 2176 | [[put-change-edit-message]] |
| 2177 | === Change commit message in Change Edit |
| 2178 | -- |
| 2179 | 'PUT /changes/link:#change-id[\{change-id\}]/edit:message |
| 2180 | -- |
| 2181 | |
| 2182 | Modify commit message. The request body needs to include a |
| 2183 | link:#change-edit-message-input[ChangeEditMessageInput] |
| 2184 | entity. |
| 2185 | |
| 2186 | .Request |
| 2187 | ---- |
| 2188 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:message HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2189 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | c967e15 | 2014-10-24 17:36:16 +0200 | [diff] [blame] | 2190 | |
| 2191 | { |
| 2192 | "message": "New commit message\n\nChange-Id: I10394472cbd17dd12454f229e4f6de00b143a444" |
| 2193 | } |
| 2194 | ---- |
| 2195 | |
| 2196 | If a change edit doesn't exist for this change yet, it is created. As |
| 2197 | response "`204 No Content`" is returned. |
| 2198 | |
| 2199 | .Response |
| 2200 | ---- |
| 2201 | HTTP/1.1 204 No Content |
| 2202 | ---- |
| 2203 | |
David Ostrovsky | 2830c29 | 2014-08-01 02:24:31 +0200 | [diff] [blame] | 2204 | [[delete-edit-file]] |
| 2205 | === Delete file in Change Edit |
| 2206 | -- |
| 2207 | 'DELETE /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile' |
| 2208 | -- |
| 2209 | |
| 2210 | Deletes a file from a change edit. This deletes the file from the repository |
| 2211 | completely. This is not the same as reverting or restoring a file to its |
| 2212 | previous contents. |
| 2213 | |
| 2214 | .Request |
| 2215 | ---- |
| 2216 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0 |
| 2217 | ---- |
| 2218 | |
| 2219 | When change edit doesn't exist for this change yet it is created. |
| 2220 | |
| 2221 | .Response |
| 2222 | ---- |
| 2223 | HTTP/1.1 204 No Content |
| 2224 | ---- |
| 2225 | |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 2226 | [[get-edit-file]] |
| 2227 | === Retrieve file content from Change Edit |
| 2228 | -- |
| 2229 | 'GET /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile |
| 2230 | -- |
| 2231 | |
| 2232 | Retrieves content of a file from a change edit. |
| 2233 | |
| 2234 | .Request |
| 2235 | ---- |
| 2236 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0 |
| 2237 | ---- |
| 2238 | |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 2239 | The content of the file is returned as text encoded inside base64. |
| 2240 | The Content-Type header will always be `text/plain` reflecting the |
| 2241 | outer base64 encoding. A Gerrit-specific `X-FYI-Content-Type` header |
| 2242 | can be examined to find the server detected content type of the file. |
| 2243 | |
| 2244 | When the specified file was deleted in the change edit |
| 2245 | "`204 No Content`" is returned. |
| 2246 | |
| 2247 | If only the content type is required, callers should use HEAD to |
| 2248 | avoid downloading the encoded file contents. |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 2249 | |
Michael Zhou | 551ad0c | 2016-04-26 01:21:42 -0400 | [diff] [blame] | 2250 | If the `base` parameter is set to true, the returned content is from the |
| 2251 | revision that the edit is based on. |
| 2252 | |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 2253 | .Response |
| 2254 | ---- |
| 2255 | HTTP/1.1 200 OK |
| 2256 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2257 | Content-Type: text/plain; charset=ISO-8859-1 |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 2258 | X-FYI-Content-Encoding: base64 |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 2259 | X-FYI-Content-Type: text/xml |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 2260 | |
| 2261 | RnJvbSA3ZGFkY2MxNTNmZGVhMTdhYTg0ZmYzMmE2ZTI0NWRiYjY... |
| 2262 | ---- |
| 2263 | |
David Ostrovsky | d007867 | 2015-02-06 21:51:04 +0100 | [diff] [blame] | 2264 | Alternatively, if the only value of the Accept request header is |
| 2265 | `application/json` the content is returned as JSON string and |
| 2266 | `X-FYI-Content-Encoding` is set to `json`. |
| 2267 | |
David Ostrovsky | 9ea9c11 | 2015-01-25 00:12:38 +0100 | [diff] [blame] | 2268 | [[get-edit-meta-data]] |
| 2269 | === Retrieve meta data of a file from Change Edit |
| 2270 | -- |
| 2271 | 'GET /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile/meta |
| 2272 | -- |
| 2273 | |
| 2274 | Retrieves meta data of a file from a change edit. Currently only |
| 2275 | web links are returned. |
| 2276 | |
| 2277 | .Request |
| 2278 | ---- |
| 2279 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo/meta HTTP/1.0 |
| 2280 | ---- |
| 2281 | |
| 2282 | This REST endpoint retrieves additional information for a file in a |
| 2283 | change edit. As result an link:#edit-file-info[EditFileInfo] entity is |
| 2284 | returned. |
| 2285 | |
| 2286 | .Response |
| 2287 | ---- |
| 2288 | HTTP/1.1 200 OK |
| 2289 | Content-Disposition: attachment |
| 2290 | Content-Type: application/json; charset=UTF-8 |
| 2291 | |
| 2292 | )]}' |
| 2293 | { |
| 2294 | "web_links":[ |
| 2295 | { |
| 2296 | "show_on_side_by_side_diff_view": true, |
| 2297 | "name": "side-by-side preview diff", |
| 2298 | "image_url": "plugins/xdocs/static/sideBySideDiffPreview.png", |
| 2299 | "url": "#/x/xdocs/c/42/1..0/README.md", |
| 2300 | "target": "_self" |
| 2301 | }, |
| 2302 | { |
| 2303 | "show_on_unified_diff_view": true, |
| 2304 | "name": "unified preview diff", |
| 2305 | "image_url": "plugins/xdocs/static/unifiedDiffPreview.png", |
| 2306 | "url": "#/x/xdocs/c/42/1..0/README.md,unified", |
| 2307 | "target": "_self" |
| 2308 | } |
| 2309 | ]} |
| 2310 | ---- |
| 2311 | |
David Ostrovsky | 3d2c070 | 2014-10-28 23:44:27 +0100 | [diff] [blame] | 2312 | [[get-edit-message]] |
| 2313 | === Retrieve commit message from Change Edit or current patch set of the change |
| 2314 | -- |
| 2315 | 'GET /changes/link:#change-id[\{change-id\}]/edit:message |
| 2316 | -- |
| 2317 | |
David Ostrovsky | 25ad15e | 2014-12-15 21:18:59 +0100 | [diff] [blame] | 2318 | Retrieves commit message from change edit. |
David Ostrovsky | 3d2c070 | 2014-10-28 23:44:27 +0100 | [diff] [blame] | 2319 | |
David Ostrovsky | 0ee0bb2 | 2016-05-31 22:47:47 +0200 | [diff] [blame] | 2320 | If the `base` parameter is set to true, the returned message is from the |
| 2321 | revision that the edit is based on. |
| 2322 | |
David Ostrovsky | 3d2c070 | 2014-10-28 23:44:27 +0100 | [diff] [blame] | 2323 | .Request |
| 2324 | ---- |
| 2325 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:message HTTP/1.0 |
| 2326 | ---- |
| 2327 | |
| 2328 | The commit message is returned as base64 encoded string. |
| 2329 | |
| 2330 | .Response |
| 2331 | ---- |
| 2332 | HTTP/1.1 200 OK |
| 2333 | |
| 2334 | VGhpcyBpcyBhIGNvbW1pdCBtZXNzYWdlCgpDaGFuZ2UtSWQ6IElhYzhmZGM1MGRlZjFiYWUzYjAz |
| 2335 | M2JhNjcxZTk0OTBmNzUxNDU5ZGUzCg== |
| 2336 | ---- |
| 2337 | |
David Ostrovsky | d007867 | 2015-02-06 21:51:04 +0100 | [diff] [blame] | 2338 | Alternatively, if the only value of the Accept request header is |
| 2339 | `application/json` the commit message is returned as JSON string: |
| 2340 | |
| 2341 | .Response |
| 2342 | ---- |
| 2343 | HTTP/1.1 200 OK |
| 2344 | |
| 2345 | )]}' |
| 2346 | "Subject of the commit message\n\nThis is the body of the commit message.\n\nChange-Id: Iaf1ba916bf843c175673d675bf7f52862f452db9\n" |
| 2347 | ---- |
| 2348 | |
| 2349 | |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 2350 | [[publish-edit]] |
| 2351 | === Publish Change Edit |
| 2352 | -- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 2353 | 'POST /changes/link:#change-id[\{change-id\}]/edit:publish |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 2354 | -- |
| 2355 | |
| 2356 | Promotes change edit to a regular patch set. |
| 2357 | |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 2358 | Options can be provided in the request body as a |
| 2359 | link:#publish-change-edit-input[PublishChangeEditInput] entity. |
| 2360 | |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 2361 | .Request |
| 2362 | ---- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 2363 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:publish HTTP/1.0 |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 2364 | Content-Type: application/json; charset=UTF-8 |
| 2365 | |
| 2366 | { |
| 2367 | "notify": "NONE" |
| 2368 | } |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 2369 | ---- |
| 2370 | |
| 2371 | As response "`204 No Content`" is returned. |
| 2372 | |
| 2373 | .Response |
| 2374 | ---- |
| 2375 | HTTP/1.1 204 No Content |
| 2376 | ---- |
| 2377 | |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 2378 | [[rebase-edit]] |
| 2379 | === Rebase Change Edit |
| 2380 | -- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 2381 | 'POST /changes/link:#change-id[\{change-id\}]/edit:rebase |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 2382 | -- |
| 2383 | |
| 2384 | Rebases change edit on top of latest patch set. |
| 2385 | |
| 2386 | .Request |
| 2387 | ---- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 2388 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:rebase HTTP/1.0 |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 2389 | ---- |
| 2390 | |
| 2391 | When change was rebased on top of latest patch set, response |
David Pursehouse | 56fbc08 | 2015-05-19 16:33:03 +0900 | [diff] [blame] | 2392 | "`204 No Content`" is returned. When change edit is already |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 2393 | based on top of the latest patch set, the response |
| 2394 | "`409 Conflict`" is returned. |
| 2395 | |
| 2396 | .Response |
| 2397 | ---- |
| 2398 | HTTP/1.1 204 No Content |
| 2399 | ---- |
| 2400 | |
David Ostrovsky | 8e75f50 | 2014-08-10 00:36:31 +0200 | [diff] [blame] | 2401 | [[delete-edit]] |
| 2402 | === Delete Change Edit |
| 2403 | -- |
| 2404 | 'DELETE /changes/link:#change-id[\{change-id\}]/edit' |
| 2405 | -- |
| 2406 | |
| 2407 | Deletes change edit. |
| 2408 | |
| 2409 | .Request |
| 2410 | ---- |
| 2411 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
| 2412 | ---- |
| 2413 | |
| 2414 | As response "`204 No Content`" is returned. |
| 2415 | |
| 2416 | .Response |
| 2417 | ---- |
| 2418 | HTTP/1.1 204 No Content |
| 2419 | ---- |
| 2420 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 2421 | [[reviewer-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2422 | == Reviewer Endpoints |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 2423 | |
| 2424 | [[list-reviewers]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2425 | === List Reviewers |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2426 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2427 | 'GET /changes/link:#change-id[\{change-id\}]/reviewers/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2428 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2429 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 2430 | Lists the reviewers of a change. |
| 2431 | |
| 2432 | As result a list of link:#reviewer-info[ReviewerInfo] entries is returned. |
| 2433 | |
| 2434 | .Request |
| 2435 | ---- |
| 2436 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/ HTTP/1.0 |
| 2437 | ---- |
| 2438 | |
| 2439 | .Response |
| 2440 | ---- |
| 2441 | HTTP/1.1 200 OK |
| 2442 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2443 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 2444 | |
| 2445 | )]}' |
| 2446 | [ |
| 2447 | { |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 2448 | "approvals": { |
| 2449 | "Verified": "+1", |
| 2450 | "Code-Review": "+2" |
| 2451 | }, |
| 2452 | "_account_id": 1000096, |
| 2453 | "name": "John Doe", |
| 2454 | "email": "john.doe@example.com" |
| 2455 | }, |
| 2456 | { |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 2457 | "approvals": { |
| 2458 | "Verified": " 0", |
| 2459 | "Code-Review": "-1" |
| 2460 | }, |
| 2461 | "_account_id": 1000097, |
| 2462 | "name": "Jane Roe", |
| 2463 | "email": "jane.roe@example.com" |
| 2464 | } |
| 2465 | ] |
| 2466 | ---- |
| 2467 | |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2468 | [[suggest-reviewers]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2469 | === Suggest Reviewers |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2470 | -- |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2471 | 'GET /changes/link:#change-id[\{change-id\}]/suggest_reviewers?q=J&n=5' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2472 | -- |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2473 | |
| 2474 | Suggest the reviewers for a given query `q` and result limit `n`. If result |
| 2475 | limit is not passed, then the default 10 is used. |
| 2476 | |
| 2477 | As result a list of link:#suggested-reviewer-info[SuggestedReviewerInfo] entries is returned. |
| 2478 | |
| 2479 | .Request |
| 2480 | ---- |
| 2481 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/suggest_reviewers?q=J HTTP/1.0 |
| 2482 | ---- |
| 2483 | |
| 2484 | .Response |
| 2485 | ---- |
| 2486 | HTTP/1.1 200 OK |
| 2487 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2488 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2489 | |
| 2490 | )]}' |
| 2491 | [ |
| 2492 | { |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2493 | "account": { |
| 2494 | "_account_id": 1000097, |
| 2495 | "name": "Jane Roe", |
| 2496 | "email": "jane.roe@example.com" |
Logan Hanks | ab3c81e | 2016-07-20 15:42:52 -0700 | [diff] [blame] | 2497 | }, |
| 2498 | "count": 1 |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2499 | }, |
| 2500 | { |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2501 | "group": { |
| 2502 | "id": "4fd581c0657268f2bdcc26699fbf9ddb76e3a279", |
| 2503 | "name": "Joiner" |
Logan Hanks | ab3c81e | 2016-07-20 15:42:52 -0700 | [diff] [blame] | 2504 | }, |
| 2505 | "count": 5 |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 2506 | } |
| 2507 | ] |
| 2508 | ---- |
| 2509 | |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 2510 | [[get-reviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2511 | === Get Reviewer |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2512 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2513 | 'GET /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2514 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2515 | |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 2516 | Retrieves a reviewer of a change. |
| 2517 | |
| 2518 | As response a link:#reviewer-info[ReviewerInfo] entity is returned that |
| 2519 | describes the reviewer. |
| 2520 | |
| 2521 | .Request |
| 2522 | ---- |
| 2523 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/john.doe@example.com HTTP/1.0 |
| 2524 | ---- |
| 2525 | |
| 2526 | .Response |
| 2527 | ---- |
| 2528 | HTTP/1.1 200 OK |
| 2529 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2530 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 2531 | |
| 2532 | )]}' |
| 2533 | { |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 2534 | "approvals": { |
| 2535 | "Verified": "+1", |
| 2536 | "Code-Review": "+2" |
| 2537 | }, |
| 2538 | "_account_id": 1000096, |
| 2539 | "name": "John Doe", |
| 2540 | "email": "john.doe@example.com" |
| 2541 | } |
| 2542 | ---- |
| 2543 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2544 | [[add-reviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2545 | === Add Reviewer |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2546 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2547 | 'POST /changes/link:#change-id[\{change-id\}]/reviewers' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2548 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2549 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2550 | Adds one user or all members of one group as reviewer to the change. |
| 2551 | |
| 2552 | The reviewer to be added to the change must be provided in the request |
| 2553 | body as a link:#reviewer-input[ReviewerInput] entity. |
| 2554 | |
| 2555 | .Request |
| 2556 | ---- |
| 2557 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2558 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2559 | |
| 2560 | { |
| 2561 | "reviewer": "john.doe@example.com" |
| 2562 | } |
| 2563 | ---- |
| 2564 | |
| 2565 | As response an link:#add-reviewer-result[AddReviewerResult] entity is |
| 2566 | returned that describes the newly added reviewers. |
| 2567 | |
| 2568 | .Response |
| 2569 | ---- |
| 2570 | HTTP/1.1 200 OK |
| 2571 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2572 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2573 | |
| 2574 | )]}' |
| 2575 | { |
| 2576 | "reviewers": [ |
| 2577 | { |
Logan Hanks | 23e7028 | 2016-07-06 14:31:56 -0700 | [diff] [blame] | 2578 | "input": "john.doe@example.com", |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2579 | "approvals": { |
| 2580 | "Verified": " 0", |
| 2581 | "Code-Review": " 0" |
| 2582 | }, |
| 2583 | "_account_id": 1000096, |
| 2584 | "name": "John Doe", |
| 2585 | "email": "john.doe@example.com" |
| 2586 | } |
| 2587 | ] |
| 2588 | } |
| 2589 | ---- |
| 2590 | |
| 2591 | If a group is specified, adding the group members as reviewers is an |
| 2592 | atomic operation. This means if an error is returned, none of the |
| 2593 | members are added as reviewer. |
| 2594 | |
| 2595 | If a group with many members is added as reviewer a confirmation may be |
| 2596 | required. |
| 2597 | |
| 2598 | .Request |
| 2599 | ---- |
| 2600 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2601 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2602 | |
| 2603 | { |
| 2604 | "reviewer": "MyProjectVerifiers" |
| 2605 | } |
| 2606 | ---- |
| 2607 | |
| 2608 | .Response |
| 2609 | ---- |
| 2610 | HTTP/1.1 200 OK |
| 2611 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2612 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2613 | |
| 2614 | )]}' |
| 2615 | { |
Logan Hanks | 23e7028 | 2016-07-06 14:31:56 -0700 | [diff] [blame] | 2616 | "input": "MyProjectVerifiers", |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2617 | "error": "The group My Group has 15 members. Do you want to add them all as reviewers?", |
| 2618 | "confirm": true |
| 2619 | } |
| 2620 | ---- |
| 2621 | |
| 2622 | To confirm the addition of the reviewers, resend the request with the |
Edwin Kempin | 08da43d | 2013-02-26 11:06:58 +0100 | [diff] [blame] | 2623 | `confirmed` flag being set. |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2624 | |
| 2625 | .Request |
| 2626 | ---- |
| 2627 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2628 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2629 | |
| 2630 | { |
Logan Hanks | 23e7028 | 2016-07-06 14:31:56 -0700 | [diff] [blame] | 2631 | "input": "MyProjectVerifiers", |
Edwin Kempin | 08da43d | 2013-02-26 11:06:58 +0100 | [diff] [blame] | 2632 | "confirmed": true |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 2633 | } |
| 2634 | ---- |
| 2635 | |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 2636 | [[delete-reviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2637 | === Delete Reviewer |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2638 | -- |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 2639 | 'DELETE /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]' + |
| 2640 | 'POST /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/delete' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2641 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2642 | |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 2643 | Deletes a reviewer from a change. |
| 2644 | |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 2645 | Options can be provided in the request body as a |
| 2646 | link:#delete-reviewer-input[DeleteReviewerInput] entity. |
| 2647 | |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 2648 | .Request |
| 2649 | ---- |
| 2650 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe HTTP/1.0 |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 2651 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/delete HTTP/1.0 |
| 2652 | ---- |
| 2653 | |
| 2654 | Please note that some proxies prohibit request bodies for DELETE |
| 2655 | requests. In this case, if you want to specify options, use a POST |
| 2656 | request: |
| 2657 | |
| 2658 | .Request |
| 2659 | ---- |
| 2660 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/delete HTTP/1.0 |
| 2661 | Content-Type: application/json; charset=UTF-8 |
| 2662 | |
| 2663 | { |
| 2664 | "notify": "NONE" |
| 2665 | } |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 2666 | ---- |
| 2667 | |
| 2668 | .Response |
| 2669 | ---- |
| 2670 | HTTP/1.1 204 No Content |
| 2671 | ---- |
| 2672 | |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 2673 | [[list-votes]] |
| 2674 | === List Votes |
| 2675 | -- |
| 2676 | 'GET /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/votes/' |
| 2677 | -- |
| 2678 | |
| 2679 | Lists the votes for a specific reviewer of the change. |
| 2680 | |
| 2681 | .Request |
| 2682 | ---- |
Edwin Kempin | 314f10a | 2016-07-11 11:39:05 +0200 | [diff] [blame] | 2683 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/ HTTP/1.0 |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 2684 | ---- |
| 2685 | |
| 2686 | As result a map is returned that maps the label name to the label value. |
| 2687 | The entries in the map are sorted by label name. |
| 2688 | |
| 2689 | .Response |
| 2690 | ---- |
| 2691 | HTTP/1.1 200 OK |
| 2692 | Content-Disposition: attachment |
| 2693 | Content-Type: application/json;charset=UTF-8 |
| 2694 | |
| 2695 | )]}' |
| 2696 | { |
| 2697 | "Code-Review": -1, |
| 2698 | "Verified": 1 |
| 2699 | "Work-In-Progress": 1, |
| 2700 | } |
| 2701 | ---- |
| 2702 | |
| 2703 | [[delete-vote]] |
| 2704 | === Delete Vote |
| 2705 | -- |
Edwin Kempin | 5488dc1 | 2016-08-29 11:13:31 +0200 | [diff] [blame] | 2706 | 'DELETE /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/votes/link:#label-id[\{label-id\}]' + |
Edwin Kempin | 32a7c53 | 2016-06-22 07:58:32 +0200 | [diff] [blame] | 2707 | 'POST /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/votes/link:#label-id[\{label-id\}]/delete' |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 2708 | -- |
| 2709 | |
| 2710 | Deletes a single vote from a change. Note, that even when the last vote of |
| 2711 | a reviewer is removed the reviewer itself is still listed on the change. |
| 2712 | |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 2713 | Options can be provided in the request body as a |
| 2714 | link:#delete-vote-input[DeleteVoteInput] entity. |
| 2715 | |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 2716 | .Request |
| 2717 | ---- |
| 2718 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/Code-Review HTTP/1.0 |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 2719 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/Code-Review/delete HTTP/1.0 |
| 2720 | ---- |
| 2721 | |
| 2722 | Please note that some proxies prohibit request bodies for DELETE |
| 2723 | requests. In this case, if you want to specify options, use a POST |
| 2724 | request: |
| 2725 | |
| 2726 | .Request |
| 2727 | ---- |
| 2728 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/Code-Review/delete HTTP/1.0 |
| 2729 | Content-Type: application/json; charset=UTF-8 |
| 2730 | |
| 2731 | { |
| 2732 | "notify": "NONE" |
| 2733 | } |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 2734 | ---- |
| 2735 | |
| 2736 | .Response |
| 2737 | ---- |
| 2738 | HTTP/1.1 204 No Content |
| 2739 | ---- |
| 2740 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2741 | [[revision-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2742 | == Revision Endpoints |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2743 | |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 2744 | [[get-commit]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2745 | === Get Commit |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2746 | -- |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 2747 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/commit' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2748 | -- |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 2749 | |
| 2750 | Retrieves a parsed commit of a revision. |
| 2751 | |
| 2752 | .Request |
| 2753 | ---- |
| 2754 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/commit HTTP/1.0 |
| 2755 | ---- |
| 2756 | |
| 2757 | As response a link:#commit-info[CommitInfo] entity is returned that |
| 2758 | describes the revision. |
| 2759 | |
| 2760 | .Response |
| 2761 | ---- |
| 2762 | HTTP/1.1 200 OK |
| 2763 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2764 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 2765 | |
| 2766 | )]}' |
| 2767 | { |
Edwin Kempin | c823740 | 2015-07-15 18:27:55 +0200 | [diff] [blame] | 2768 | "commit": "674ac754f91e64a0efb8087e59a176484bd534d1", |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 2769 | "parents": [ |
| 2770 | { |
| 2771 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 2772 | "subject": "Migrate contributor agreements to All-Projects." |
| 2773 | } |
| 2774 | ], |
| 2775 | "author": { |
| 2776 | "name": "Shawn O. Pearce", |
| 2777 | "email": "sop@google.com", |
| 2778 | "date": "2012-04-24 18:08:08.000000000", |
| 2779 | "tz": -420 |
| 2780 | }, |
| 2781 | "committer": { |
| 2782 | "name": "Shawn O. Pearce", |
| 2783 | "email": "sop@google.com", |
| 2784 | "date": "2012-04-24 18:08:08.000000000", |
| 2785 | "tz": -420 |
| 2786 | }, |
| 2787 | "subject": "Use an EventBus to manage star icons", |
| 2788 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 2789 | } |
| 2790 | ---- |
| 2791 | |
Sven Selberg | d26bd54 | 2014-11-21 16:28:10 +0100 | [diff] [blame] | 2792 | Adding query parameter `links` (for example `/changes/.../commit?links`) |
| 2793 | returns a link:#commit-info[CommitInfo] with the additional field `web_links`. |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 2794 | |
Kasper Nilsson | 9f2ed6a | 2016-11-15 11:12:37 -0800 | [diff] [blame] | 2795 | [[get-description]] |
| 2796 | === Get Description |
| 2797 | -- |
| 2798 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/description' |
| 2799 | -- |
| 2800 | |
| 2801 | Retrieves the description of a patch set. |
| 2802 | |
| 2803 | .Request |
| 2804 | ---- |
| 2805 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/description HTTP/1.0 |
| 2806 | ---- |
| 2807 | |
| 2808 | .Response |
| 2809 | ---- |
| 2810 | HTTP/1.1 200 OK |
| 2811 | Content-Disposition: attachment |
| 2812 | Content-Type: application/json; charset=UTF-8 |
| 2813 | |
| 2814 | )]}' |
| 2815 | "Added Documentation" |
| 2816 | ---- |
| 2817 | |
| 2818 | If the patch set does not have a description an empty string is returned. |
| 2819 | |
| 2820 | [[set-description]] |
| 2821 | === Set Description |
| 2822 | -- |
| 2823 | 'PUT /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/description' |
| 2824 | -- |
| 2825 | |
| 2826 | Sets the description of a patch set. |
| 2827 | |
| 2828 | The new description must be provided in the request body inside a |
| 2829 | link:#description-input[DescriptionInput] entity. |
| 2830 | |
| 2831 | .Request |
| 2832 | ---- |
| 2833 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/description HTTP/1.0 |
| 2834 | Content-Type: application/json; charset=UTF-8 |
| 2835 | |
| 2836 | { |
| 2837 | "description": "Added Documentation" |
| 2838 | } |
| 2839 | ---- |
| 2840 | |
| 2841 | As response the new description is returned. |
| 2842 | |
| 2843 | .Response |
| 2844 | ---- |
| 2845 | HTTP/1.1 200 OK |
| 2846 | Content-Disposition: attachment |
| 2847 | Content-Type: application/json; charset=UTF-8 |
| 2848 | |
| 2849 | )]}' |
| 2850 | "Added Documentation" |
| 2851 | ---- |
| 2852 | |
Edwin Kempin | 0f22944 | 2016-09-09 13:06:12 +0200 | [diff] [blame] | 2853 | [[get-merge-list]] |
| 2854 | === Get Merge List |
| 2855 | -- |
| 2856 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/mergelist' |
| 2857 | -- |
| 2858 | |
| 2859 | Returns the list of commits that are being integrated into a target |
| 2860 | branch by a merge commit. By default the first parent is assumed to be |
| 2861 | uninteresting. By using the `parent` option another parent can be set |
| 2862 | as uninteresting (parents are 1-based). |
| 2863 | |
| 2864 | The list of commits is returned as a list of |
| 2865 | link:#commit-info[CommitInfo] entities. Web links are only included if |
| 2866 | the `links` option was set. |
| 2867 | |
| 2868 | .Request |
| 2869 | ---- |
| 2870 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/7e30d802b890ec8d0be45b1cc2a8ef092bcfc858/mergelist HTTP/1.0 |
| 2871 | ---- |
| 2872 | |
| 2873 | .Response |
| 2874 | ---- |
| 2875 | HTTP/1.1 200 OK |
| 2876 | Content-Disposition: attachment |
| 2877 | Content-Type: application/json; charset=UTF-8 |
| 2878 | |
| 2879 | )]}' |
| 2880 | [ |
| 2881 | { |
| 2882 | "commit": "674ac754f91e64a0efb8087e59a176484bd534d1", |
| 2883 | "parents": [ |
| 2884 | { |
| 2885 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 2886 | "subject": "Migrate contributor agreements to All-Projects." |
| 2887 | } |
| 2888 | ], |
| 2889 | "author": { |
| 2890 | "name": "Shawn O. Pearce", |
| 2891 | "email": "sop@google.com", |
| 2892 | "date": "2012-04-24 18:08:08.000000000", |
| 2893 | "tz": -420 |
| 2894 | }, |
| 2895 | "committer": { |
| 2896 | "name": "Shawn O. Pearce", |
| 2897 | "email": "sop@google.com", |
| 2898 | "date": "2012-04-24 18:08:08.000000000", |
| 2899 | "tz": -420 |
| 2900 | }, |
| 2901 | "subject": "Use an EventBus to manage star icons", |
| 2902 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 2903 | } |
| 2904 | ] |
| 2905 | ---- |
| 2906 | |
Stefan Beller | c725966 | 2015-02-12 17:23:05 -0800 | [diff] [blame] | 2907 | [[get-revision-actions]] |
| 2908 | === Get Revision Actions |
| 2909 | -- |
| 2910 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/actions' |
| 2911 | -- |
| 2912 | |
| 2913 | Retrieves revision link:#action-info[actions] of the revision of a change. |
| 2914 | |
| 2915 | .Request |
| 2916 | ---- |
| 2917 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/actions' HTTP/1.0 |
| 2918 | ---- |
| 2919 | |
| 2920 | .Response |
| 2921 | ---- |
| 2922 | HTTP/1.1 200 OK |
| 2923 | Content-Disposition: attachment |
| 2924 | Content-Type: application/json; charset=UTF-8 |
| 2925 | |
| 2926 | )]}' |
| 2927 | |
| 2928 | { |
| 2929 | "submit": { |
| 2930 | "method": "POST", |
| 2931 | "label": "Submit", |
| 2932 | "title": "Submit patch set 1 into master", |
| 2933 | "enabled": true |
| 2934 | }, |
| 2935 | "cherrypick": { |
| 2936 | "method": "POST", |
| 2937 | "label": "Cherry Pick", |
| 2938 | "title": "Cherry pick change to a different branch", |
| 2939 | "enabled": true |
| 2940 | } |
| 2941 | } |
| 2942 | ---- |
| 2943 | |
| 2944 | The response is a flat map of possible revision actions mapped to their |
| 2945 | link:#action-info[ActionInfo]. |
| 2946 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2947 | [[get-review]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2948 | === Get Review |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2949 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2950 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/review' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2951 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2952 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2953 | Retrieves a review of a revision. |
| 2954 | |
| 2955 | .Request |
| 2956 | ---- |
| 2957 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/review HTTP/1.0 |
| 2958 | ---- |
| 2959 | |
| 2960 | As response a link:#change-info[ChangeInfo] entity with |
| 2961 | link:#detailed-labels[detailed labels] and link:#detailed-accounts[ |
| 2962 | detailed accounts] is returned that describes the review of the |
| 2963 | revision. The revision for which the review is retrieved is contained |
| 2964 | in the `revisions` field. In addition the `current_revision` field is |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 2965 | set if the revision for which the review is retrieved is the current |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2966 | revision of the change. Please note that the returned labels are always |
| 2967 | for the current patch set. |
| 2968 | |
| 2969 | .Response |
| 2970 | ---- |
| 2971 | HTTP/1.1 200 OK |
| 2972 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2973 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2974 | |
| 2975 | )]}' |
| 2976 | { |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2977 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2978 | "project": "myProject", |
| 2979 | "branch": "master", |
| 2980 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2981 | "subject": "Implementing Feature X", |
| 2982 | "status": "NEW", |
| 2983 | "created": "2013-02-01 09:59:32.126000000", |
| 2984 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2985 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 2986 | "insertions": 34, |
| 2987 | "deletions": 45, |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 2988 | "_number": 3965, |
| 2989 | "owner": { |
| 2990 | "_account_id": 1000096, |
| 2991 | "name": "John Doe", |
| 2992 | "email": "john.doe@example.com" |
| 2993 | }, |
| 2994 | "labels": { |
| 2995 | "Verified": { |
| 2996 | "all": [ |
| 2997 | { |
| 2998 | "value": 0, |
| 2999 | "_account_id": 1000096, |
| 3000 | "name": "John Doe", |
| 3001 | "email": "john.doe@example.com" |
| 3002 | }, |
| 3003 | { |
| 3004 | "value": 0, |
| 3005 | "_account_id": 1000097, |
| 3006 | "name": "Jane Roe", |
| 3007 | "email": "jane.roe@example.com" |
| 3008 | } |
| 3009 | ], |
| 3010 | "values": { |
| 3011 | "-1": "Fails", |
| 3012 | " 0": "No score", |
| 3013 | "+1": "Verified" |
| 3014 | } |
| 3015 | }, |
| 3016 | "Code-Review": { |
| 3017 | "all": [ |
| 3018 | { |
| 3019 | "value": -1, |
| 3020 | "_account_id": 1000096, |
| 3021 | "name": "John Doe", |
| 3022 | "email": "john.doe@example.com" |
| 3023 | }, |
| 3024 | { |
| 3025 | "value": 1, |
| 3026 | "_account_id": 1000097, |
| 3027 | "name": "Jane Roe", |
| 3028 | "email": "jane.roe@example.com" |
| 3029 | } |
| 3030 | ] |
| 3031 | "values": { |
Paul Fertser | 2474e52 | 2014-01-23 10:00:59 +0400 | [diff] [blame] | 3032 | "-2": "This shall not be merged", |
| 3033 | "-1": "I would prefer this is not merged as is", |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 3034 | " 0": "No score", |
| 3035 | "+1": "Looks good to me, but someone else must approve", |
| 3036 | "+2": "Looks good to me, approved" |
| 3037 | } |
| 3038 | } |
| 3039 | }, |
| 3040 | "permitted_labels": { |
| 3041 | "Verified": [ |
| 3042 | "-1", |
| 3043 | " 0", |
| 3044 | "+1" |
| 3045 | ], |
| 3046 | "Code-Review": [ |
| 3047 | "-2", |
| 3048 | "-1", |
| 3049 | " 0", |
| 3050 | "+1", |
| 3051 | "+2" |
| 3052 | ] |
| 3053 | }, |
| 3054 | "removable_reviewers": [ |
| 3055 | { |
| 3056 | "_account_id": 1000096, |
| 3057 | "name": "John Doe", |
| 3058 | "email": "john.doe@example.com" |
| 3059 | }, |
| 3060 | { |
| 3061 | "_account_id": 1000097, |
| 3062 | "name": "Jane Roe", |
| 3063 | "email": "jane.roe@example.com" |
| 3064 | } |
| 3065 | ], |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 3066 | "reviewers": { |
| 3067 | "REVIEWER": [ |
| 3068 | { |
| 3069 | "_account_id": 1000096, |
| 3070 | "name": "John Doe", |
| 3071 | "email": "john.doe@example.com" |
| 3072 | }, |
| 3073 | { |
| 3074 | "_account_id": 1000097, |
| 3075 | "name": "Jane Roe", |
| 3076 | "email": "jane.roe@example.com" |
| 3077 | } |
| 3078 | ] |
| 3079 | }, |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 3080 | "current_revision": "674ac754f91e64a0efb8087e59a176484bd534d1", |
| 3081 | "revisions": { |
| 3082 | "674ac754f91e64a0efb8087e59a176484bd534d1": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 3083 | "kind": "REWORK", |
| 3084 | "_number": 2, |
| 3085 | "ref": "refs/changes/65/3965/2", |
| 3086 | "fetch": { |
| 3087 | "http": { |
| 3088 | "url": "http://gerrit/myProject", |
| 3089 | "ref": "refs/changes/65/3965/2" |
| 3090 | } |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 3091 | } |
| 3092 | } |
| 3093 | } |
| 3094 | } |
| 3095 | ---- |
| 3096 | |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 3097 | [[get-related-changes]] |
| 3098 | === Get Related Changes |
| 3099 | -- |
| 3100 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/related' |
| 3101 | -- |
| 3102 | |
| 3103 | Retrieves related changes of a revision. Related changes are changes that either |
| 3104 | depend on, or are dependencies of the revision. |
| 3105 | |
| 3106 | .Request |
| 3107 | ---- |
| 3108 | GET /changes/gerrit~master~I5e4fc08ce34d33c090c9e0bf320de1b17309f774/revisions/b1cb4caa6be46d12b94c25aa68aebabcbb3f53fe/related HTTP/1.0 |
| 3109 | ---- |
| 3110 | |
| 3111 | As result a link:#related-changes-info[RelatedChangesInfo] entity is returned |
| 3112 | describing the related changes. |
| 3113 | |
| 3114 | .Response |
| 3115 | ---- |
| 3116 | HTTP/1.1 200 OK |
| 3117 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3118 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 3119 | |
| 3120 | )]}' |
| 3121 | { |
| 3122 | "changes": [ |
| 3123 | { |
| 3124 | "change_id": "Ic62ae3103fca2214904dbf2faf4c861b5f0ae9b5", |
| 3125 | "commit": { |
| 3126 | "commit": "78847477532e386f5a2185a4e8c90b2509e354e3", |
| 3127 | "parents": [ |
| 3128 | { |
| 3129 | "commit": "bb499510bbcdbc9164d96b0dbabb4aa45f59a87e" |
| 3130 | } |
| 3131 | ], |
| 3132 | "author": { |
| 3133 | "name": "David Ostrovsky", |
| 3134 | "email": "david@ostrovsky.org", |
| 3135 | "date": "2014-07-12 15:04:24.000000000", |
| 3136 | "tz": 120 |
| 3137 | }, |
| 3138 | "subject": "Remove Solr" |
| 3139 | }, |
| 3140 | "_change_number": 58478, |
| 3141 | "_revision_number": 2, |
| 3142 | "_current_revision_number": 2 |
Stefan Beller | 3e8bd6e | 2015-06-17 09:46:36 -0700 | [diff] [blame] | 3143 | "status": "NEW" |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 3144 | }, |
| 3145 | { |
| 3146 | "change_id": "I5e4fc08ce34d33c090c9e0bf320de1b17309f774", |
| 3147 | "commit": { |
| 3148 | "commit": "b1cb4caa6be46d12b94c25aa68aebabcbb3f53fe", |
| 3149 | "parents": [ |
| 3150 | { |
| 3151 | "commit": "d898f12a9b7a92eb37e7a80636195a1b06417aad" |
| 3152 | } |
| 3153 | ], |
| 3154 | "author": { |
| 3155 | "name": "David Pursehouse", |
| 3156 | "email": "david.pursehouse@sonymobile.com", |
| 3157 | "date": "2014-06-24 02:01:28.000000000", |
| 3158 | "tz": 540 |
| 3159 | }, |
| 3160 | "subject": "Add support for secondary index with Elasticsearch" |
| 3161 | }, |
| 3162 | "_change_number": 58081, |
| 3163 | "_revision_number": 10, |
| 3164 | "_current_revision_number": 10 |
Stefan Beller | 3e8bd6e | 2015-06-17 09:46:36 -0700 | [diff] [blame] | 3165 | "status": "NEW" |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 3166 | } |
| 3167 | ] |
| 3168 | } |
| 3169 | ---- |
| 3170 | |
| 3171 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 3172 | [[set-review]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3173 | === Set Review |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3174 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3175 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/review' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3176 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3177 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 3178 | Sets a review on a revision. |
| 3179 | |
| 3180 | The review must be provided in the request body as a |
| 3181 | link:#review-input[ReviewInput] entity. |
| 3182 | |
| 3183 | .Request |
| 3184 | ---- |
| 3185 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/review HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3186 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 3187 | |
| 3188 | { |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 3189 | "tag": "jenkins", |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 3190 | "message": "Some nits need to be fixed.", |
| 3191 | "labels": { |
| 3192 | "Code-Review": -1 |
| 3193 | }, |
| 3194 | "comments": { |
| 3195 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 3196 | { |
| 3197 | "line": 23, |
| 3198 | "message": "[nit] trailing whitespace" |
| 3199 | }, |
| 3200 | { |
| 3201 | "line": 49, |
| 3202 | "message": "[nit] s/conrtol/control" |
David Pursehouse | b53c1f6 | 2014-08-26 14:51:33 +0900 | [diff] [blame] | 3203 | }, |
| 3204 | { |
| 3205 | "range": { |
| 3206 | "start_line": 50, |
| 3207 | "start_character": 0, |
| 3208 | "end_line": 55, |
| 3209 | "end_character": 20 |
| 3210 | }, |
David Pursehouse | b53c1f6 | 2014-08-26 14:51:33 +0900 | [diff] [blame] | 3211 | "message": "Incorrect indentation" |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 3212 | } |
| 3213 | ] |
| 3214 | } |
| 3215 | } |
| 3216 | ---- |
| 3217 | |
| 3218 | As response a link:#review-info[ReviewInfo] entity is returned that |
| 3219 | describes the applied labels. |
| 3220 | |
| 3221 | .Response |
| 3222 | ---- |
| 3223 | HTTP/1.1 200 OK |
| 3224 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3225 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 3226 | |
| 3227 | )]}' |
| 3228 | { |
| 3229 | "labels": { |
| 3230 | "Code-Review": -1 |
| 3231 | } |
| 3232 | } |
| 3233 | ---- |
| 3234 | |
Edwin Kempin | d0febd3 | 2015-01-07 10:27:31 +0100 | [diff] [blame] | 3235 | A review cannot be set on a change edit. Trying to post a review for a |
| 3236 | change edit fails with `409 Conflict`. |
| 3237 | |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 3238 | It is also possible to add one or more reviewers to a change simultaneously |
| 3239 | with a review. |
| 3240 | |
| 3241 | .Request |
| 3242 | ---- |
| 3243 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/review HTTP/1.0 |
| 3244 | Content-Type: application/json; charset=UTF-8 |
| 3245 | |
| 3246 | { |
| 3247 | "message": "Looks good to me, but Jane and John should also take a look.", |
| 3248 | "labels": { |
| 3249 | "Code-Review": 1 |
| 3250 | }, |
| 3251 | "reviewers": [ |
| 3252 | { |
| 3253 | "reviewer": "jane.roe@example.com" |
| 3254 | }, |
| 3255 | { |
| 3256 | "reviewer": "john.doe@example.com" |
| 3257 | } |
| 3258 | ] |
| 3259 | } |
| 3260 | ---- |
| 3261 | |
| 3262 | Each element of the `reviewers` list is an instance of |
| 3263 | link:#reviewer-input[ReviewerInput]. The corresponding result of |
| 3264 | adding each reviewer will be returned in a list of |
Logan Hanks | e2aacef | 2016-07-22 15:54:52 -0700 | [diff] [blame] | 3265 | link:#add-reviewer-result[AddReviewerResult]. |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 3266 | |
| 3267 | .Response |
| 3268 | ---- |
| 3269 | HTTP/1.1 200 OK |
| 3270 | Content-Disposition: attachment |
| 3271 | Content-Type: application/json; charset=UTF-8 |
| 3272 | |
| 3273 | )]}' |
| 3274 | { |
| 3275 | "labels": { |
| 3276 | "Code-Review": 1 |
| 3277 | }, |
| 3278 | "reviewers": [ |
| 3279 | { |
| 3280 | "input": "jane.roe@example.com", |
| 3281 | "approvals": { |
| 3282 | "Verified": " 0", |
| 3283 | "Code-Review": " 0" |
| 3284 | }, |
| 3285 | "_account_id": 1000097, |
| 3286 | "name": "Jane Roe", |
| 3287 | "email": "jane.roe@example.com" |
| 3288 | }, |
| 3289 | { |
| 3290 | "input": "john.doe@example.com", |
| 3291 | "approvals": { |
| 3292 | "Verified": " 0", |
| 3293 | "Code-Review": " 0" |
| 3294 | }, |
| 3295 | "_account_id": 1000096, |
| 3296 | "name": "John Doe", |
| 3297 | "email": "john.doe@example.com" |
| 3298 | } |
| 3299 | ] |
| 3300 | } |
| 3301 | ---- |
| 3302 | |
Logan Hanks | e2aacef | 2016-07-22 15:54:52 -0700 | [diff] [blame] | 3303 | If there are any errors returned for reviewers, the entire review request will |
| 3304 | be rejected with `400 Bad Request`. |
| 3305 | |
| 3306 | .Error Response |
| 3307 | ---- |
| 3308 | HTTP/1.1 400 Bad Request |
| 3309 | Content-Disposition: attachment |
| 3310 | Content-Type: application/json; charset=UTF-8 |
| 3311 | |
| 3312 | )]}' |
| 3313 | { |
| 3314 | "reviewers": { |
| 3315 | "MyProjectVerifiers": { |
| 3316 | "input": "MyProjectVerifiers", |
| 3317 | "error": "The group My Group has 15 members. Do you want to add them all as reviewers?", |
| 3318 | "confirm": true |
| 3319 | } |
| 3320 | } |
| 3321 | } |
| 3322 | ---- |
| 3323 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3324 | [[rebase-revision]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3325 | === Rebase Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3326 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3327 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/rebase' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3328 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3329 | |
| 3330 | Rebases a revision. |
| 3331 | |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 3332 | Optionally, the parent revision can be changed to another patch set through the |
| 3333 | link:#rebase-input[RebaseInput] entity. |
| 3334 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3335 | .Request |
| 3336 | ---- |
| 3337 | POST /changes/myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/rebase HTTP/1.0 |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 3338 | Content-Type: application/json;charset=UTF-8 |
| 3339 | |
| 3340 | { |
| 3341 | "base" : "1234", |
| 3342 | } |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3343 | ---- |
| 3344 | |
| 3345 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 3346 | describes the rebased change. Information about the current patch set |
| 3347 | is included. |
| 3348 | |
| 3349 | .Response |
| 3350 | ---- |
| 3351 | HTTP/1.1 200 OK |
| 3352 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3353 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3354 | |
| 3355 | )]}' |
| 3356 | { |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3357 | "id": "myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 3358 | "project": "myProject", |
| 3359 | "branch": "master", |
| 3360 | "change_id": "I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 3361 | "subject": "Implement Feature X", |
| 3362 | "status": "NEW", |
| 3363 | "created": "2013-02-01 09:59:32.126000000", |
| 3364 | "updated": "2013-02-21 11:16:36.775000000", |
| 3365 | "mergeable": false, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 3366 | "insertions": 21, |
| 3367 | "deletions": 21, |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3368 | "_number": 4799, |
| 3369 | "owner": { |
| 3370 | "name": "John Doe" |
| 3371 | }, |
| 3372 | "current_revision": "27cc4558b5a3d3387dd11ee2df7a117e7e581822", |
| 3373 | "revisions": { |
| 3374 | "27cc4558b5a3d3387dd11ee2df7a117e7e581822": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 3375 | "kind": "REWORK", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3376 | "_number": 2, |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 3377 | "ref": "refs/changes/99/4799/2", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3378 | "fetch": { |
| 3379 | "http": { |
| 3380 | "url": "http://gerrit:8080/myProject", |
| 3381 | "ref": "refs/changes/99/4799/2" |
| 3382 | } |
| 3383 | }, |
| 3384 | "commit": { |
| 3385 | "parents": [ |
| 3386 | { |
| 3387 | "commit": "b4003890dadd406d80222bf1ad8aca09a4876b70", |
| 3388 | "subject": "Implement Feature A" |
| 3389 | } |
Yuxuan Wang | cc598ac | 2016-07-12 17:11:05 +0000 | [diff] [blame] | 3390 | ], |
| 3391 | "author": { |
| 3392 | "name": "John Doe", |
| 3393 | "email": "john.doe@example.com", |
| 3394 | "date": "2013-05-07 15:21:27.000000000", |
| 3395 | "tz": 120 |
| 3396 | }, |
| 3397 | "committer": { |
| 3398 | "name": "Gerrit Code Review", |
| 3399 | "email": "gerrit-server@example.com", |
| 3400 | "date": "2013-05-07 15:35:43.000000000", |
| 3401 | "tz": 120 |
| 3402 | }, |
| 3403 | "subject": "Implement Feature X", |
| 3404 | "message": "Implement Feature X\n\nAdded feature X." |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3405 | } |
| 3406 | } |
| 3407 | } |
| 3408 | ---- |
| 3409 | |
| 3410 | If the revision cannot be rebased, e.g. due to conflicts, the response is |
| 3411 | "`409 Conflict`" and the error message is contained in the response |
| 3412 | body. |
| 3413 | |
| 3414 | .Response |
| 3415 | ---- |
| 3416 | HTTP/1.1 409 Conflict |
| 3417 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3418 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 3419 | |
| 3420 | The change could not be rebased due to a path conflict during merge. |
| 3421 | ---- |
| 3422 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 3423 | [[submit-revision]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3424 | === Submit Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3425 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3426 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/submit' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3427 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3428 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 3429 | Submits a revision. |
| 3430 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 3431 | .Request |
| 3432 | ---- |
| 3433 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/submit HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3434 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 3435 | ---- |
| 3436 | |
| 3437 | As response a link:#submit-info[SubmitInfo] entity is returned that |
| 3438 | describes the status of the submitted change. |
| 3439 | |
| 3440 | .Response |
| 3441 | ---- |
| 3442 | HTTP/1.1 200 OK |
| 3443 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3444 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 3445 | |
| 3446 | )]}' |
| 3447 | { |
| 3448 | "status": "MERGED" |
| 3449 | } |
| 3450 | ---- |
| 3451 | |
| 3452 | If the revision cannot be submitted, e.g. because the submit rule |
| 3453 | doesn't allow submitting the revision or the revision is not the |
| 3454 | current revision, the response is "`409 Conflict`" and the error |
| 3455 | message is contained in the response body. |
| 3456 | |
| 3457 | .Response |
| 3458 | ---- |
| 3459 | HTTP/1.1 409 Conflict |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3460 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 3461 | |
| 3462 | "revision 674ac754f91e64a0efb8087e59a176484bd534d1 is not current revision" |
| 3463 | ---- |
| 3464 | |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 3465 | [[publish-draft-revision]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3466 | === Publish Draft Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3467 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 3468 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/publish' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3469 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 3470 | |
| 3471 | Publishes a draft revision. |
| 3472 | |
| 3473 | .Request |
| 3474 | ---- |
| 3475 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/publish HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3476 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 3477 | ---- |
| 3478 | |
| 3479 | .Response |
| 3480 | ---- |
| 3481 | HTTP/1.1 204 No Content |
| 3482 | ---- |
| 3483 | |
| 3484 | [[delete-draft-revision]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3485 | === Delete Draft Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3486 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 3487 | 'DELETE /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3488 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 3489 | |
| 3490 | Deletes a draft revision. |
| 3491 | |
| 3492 | .Request |
| 3493 | ---- |
| 3494 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1 HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3495 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 3496 | ---- |
| 3497 | |
| 3498 | .Response |
| 3499 | ---- |
| 3500 | HTTP/1.1 204 No Content |
| 3501 | ---- |
| 3502 | |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 3503 | [[get-patch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3504 | === Get Patch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3505 | -- |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 3506 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/patch' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3507 | -- |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 3508 | |
| 3509 | Gets the formatted patch for one revision. |
| 3510 | |
| 3511 | .Request |
| 3512 | ---- |
| 3513 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/patch HTTP/1.0 |
| 3514 | ---- |
| 3515 | |
Shawn Pearce | 98361f7 | 2013-05-10 16:27:36 -0700 | [diff] [blame] | 3516 | The formatted patch is returned as text encoded inside base64: |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 3517 | |
| 3518 | .Response |
| 3519 | ---- |
| 3520 | HTTP/1.1 200 OK |
| 3521 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3522 | Content-Type: text/plain; charset=ISO-8859-1 |
Shawn Pearce | 98361f7 | 2013-05-10 16:27:36 -0700 | [diff] [blame] | 3523 | X-FYI-Content-Encoding: base64 |
| 3524 | X-FYI-Content-Type: application/mbox |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 3525 | |
Shawn Pearce | 98361f7 | 2013-05-10 16:27:36 -0700 | [diff] [blame] | 3526 | RnJvbSA3ZGFkY2MxNTNmZGVhMTdhYTg0ZmYzMmE2ZTI0NWRiYjY... |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 3527 | ---- |
| 3528 | |
David Ostrovsky | 973f38b | 2013-08-22 00:24:51 -0700 | [diff] [blame] | 3529 | Adding query parameter `zip` (for example `/changes/.../patch?zip`) |
| 3530 | returns the patch as a single file inside of a ZIP archive. Clients |
| 3531 | can expand the ZIP to obtain the plain text patch, avoiding the |
| 3532 | need for a base64 decoding step. This option implies `download`. |
| 3533 | |
| 3534 | Query parameter `download` (e.g. `/changes/.../patch?download`) |
| 3535 | will suggest the browser save the patch as `commitsha1.diff.base64`, |
| 3536 | for later processing by command line tools. |
| 3537 | |
Kasper Nilsson | 8144807 | 2016-10-17 15:04:33 -0700 | [diff] [blame] | 3538 | If the `path` parameter is set, the returned content is a diff of the single |
| 3539 | file that the path refers to. |
| 3540 | |
Stefan Beller | dfa1ef3 | 2016-09-16 12:20:02 -0700 | [diff] [blame] | 3541 | [[submit-preview]] |
Edwin Kempin | 807eb4b | 2016-10-18 15:49:41 +0200 | [diff] [blame] | 3542 | === Submit Preview |
Stefan Beller | dfa1ef3 | 2016-09-16 12:20:02 -0700 | [diff] [blame] | 3543 | -- |
| 3544 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/preview_submit' |
| 3545 | -- |
| 3546 | Gets a file containing thin bundles of all modified projects if this |
| 3547 | change was submitted. The bundles are named `${ProjectName}.git`. |
| 3548 | Each thin bundle contains enough to construct the state in which a project would |
| 3549 | be in if this change were submitted. The base of the thin bundles are the |
| 3550 | current target branches, so to make use of this call in a non-racy way, first |
| 3551 | get the bundles and then fetch all projects contained in the bundle. |
| 3552 | (This assumes no non-fastforward pushes). |
| 3553 | |
| 3554 | You need to give a parameter '?format=zip' or '?format=tar' to specify the |
Stefan Beller | 3e58674 | 2016-10-05 15:23:22 -0700 | [diff] [blame] | 3555 | format for the outer container. It is always possible to use tgz, even if |
| 3556 | tgz is not in the list of allowed archive formats. |
Stefan Beller | dfa1ef3 | 2016-09-16 12:20:02 -0700 | [diff] [blame] | 3557 | |
| 3558 | To make good use of this call, you would roughly need code as found at: |
| 3559 | ---- |
| 3560 | $ curl -Lo preview_submit_test.sh http://review.example.com:8080/tools/scripts/preview_submit_test.sh |
| 3561 | ---- |
| 3562 | .Request |
| 3563 | ---- |
| 3564 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/preview_submit?zip HTTP/1.0 |
| 3565 | ---- |
| 3566 | |
| 3567 | .Response |
| 3568 | ---- |
| 3569 | HTTP/1.1 200 OK |
| 3570 | Date: Tue, 13 Sep 2016 19:13:46 GMT |
| 3571 | Content-Disposition: attachment; filename="submit-preview-147.zip" |
| 3572 | X-Content-Type-Options: nosniff |
| 3573 | Cache-Control: no-cache, no-store, max-age=0, must-revalidate |
| 3574 | Pragma: no-cache |
| 3575 | Expires: Mon, 01 Jan 1990 00:00:00 GMT |
| 3576 | Content-Type: application/x-zip |
| 3577 | Transfer-Encoding: chunked |
| 3578 | |
| 3579 | [binary stuff] |
| 3580 | ---- |
| 3581 | |
| 3582 | In case of an error, the response is not a zip file but a regular json response, |
| 3583 | containing only the error message: |
| 3584 | |
| 3585 | .Response |
| 3586 | ---- |
| 3587 | HTTP/1.1 200 OK |
| 3588 | Content-Disposition: attachment |
| 3589 | Content-Type: application/json; charset=UTF-8 |
| 3590 | |
| 3591 | )]}' |
| 3592 | "Anonymous users cannot submit" |
| 3593 | ---- |
| 3594 | |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 3595 | [[get-mergeable]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3596 | === Get Mergeable |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3597 | -- |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 3598 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/mergeable' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3599 | -- |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 3600 | |
| 3601 | Gets the method the server will use to submit (merge) the change and |
| 3602 | an indicator if the change is currently mergeable. |
| 3603 | |
| 3604 | .Request |
| 3605 | ---- |
| 3606 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/mergeable HTTP/1.0 |
| 3607 | ---- |
| 3608 | |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 3609 | As response a link:#mergeable-info[MergeableInfo] entity is returned. |
| 3610 | |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 3611 | .Response |
| 3612 | ---- |
| 3613 | HTTP/1.1 200 OK |
| 3614 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3615 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 3616 | |
| 3617 | )]}' |
| 3618 | { |
| 3619 | submit_type: "MERGE_IF_NECESSARY", |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 3620 | strategy: "recursive", |
| 3621 | mergeable: true |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 3622 | } |
| 3623 | ---- |
| 3624 | |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 3625 | If the `other-branches` parameter is specified, the mergeability will also be |
Zhen Chen | 6729b63 | 2016-11-11 17:32:32 -0800 | [diff] [blame] | 3626 | checked for all other branches which are listed in the |
| 3627 | link:config-project-config.html#branchOrder-section[branchOrder] section in the |
| 3628 | project.config file. |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 3629 | |
| 3630 | .Request |
| 3631 | ---- |
| 3632 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/mergeable?other-branches HTTP/1.0 |
| 3633 | ---- |
| 3634 | |
| 3635 | The response will then contain a list of all other branches where this changes |
| 3636 | could merge cleanly. |
| 3637 | |
| 3638 | .Response |
| 3639 | ---- |
| 3640 | HTTP/1.1 200 OK |
| 3641 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3642 | Content-Type: application/json; charset=UTF-8 |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 3643 | |
| 3644 | )]}' |
| 3645 | { |
| 3646 | submit_type: "MERGE_IF_NECESSARY", |
| 3647 | mergeable: true, |
| 3648 | mergeable_into: [ |
| 3649 | "refs/heads/stable-2.7", |
| 3650 | "refs/heads/stable-2.8", |
| 3651 | ] |
| 3652 | } |
| 3653 | ---- |
| 3654 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3655 | [[get-submit-type]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3656 | === Get Submit Type |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3657 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3658 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/submit_type' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3659 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3660 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3661 | Gets the method the server will use to submit (merge) the change. |
| 3662 | |
| 3663 | .Request |
| 3664 | ---- |
| 3665 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/submit_type HTTP/1.0 |
| 3666 | ---- |
| 3667 | |
| 3668 | .Response |
| 3669 | ---- |
| 3670 | HTTP/1.1 200 OK |
| 3671 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3672 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3673 | |
| 3674 | )]}' |
| 3675 | "MERGE_IF_NECESSARY" |
| 3676 | ---- |
| 3677 | |
| 3678 | [[test-submit-type]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3679 | === Test Submit Type |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3680 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3681 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/test.submit_type' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3682 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3683 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3684 | Tests the submit_type Prolog rule in the project, or the one given. |
| 3685 | |
| 3686 | Request body may be either the Prolog code as `text/plain` or a |
| 3687 | link:#rule-input[RuleInput] object. The query parameter `filters` |
| 3688 | may be set to `SKIP` to bypass parent project filters while testing |
| 3689 | a project-specific rule. |
| 3690 | |
| 3691 | .Request |
| 3692 | ---- |
| 3693 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/test.submit_type HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3694 | Content-Type: text/plain; charset-UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3695 | |
| 3696 | submit_type(cherry_pick). |
| 3697 | ---- |
| 3698 | |
| 3699 | .Response |
| 3700 | ---- |
| 3701 | HTTP/1.1 200 OK |
| 3702 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3703 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3704 | |
| 3705 | )]}' |
Shawn Pearce | 7076f4e | 2013-08-20 22:11:51 -0700 | [diff] [blame] | 3706 | "CHERRY_PICK" |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3707 | ---- |
| 3708 | |
| 3709 | [[test-submit-rule]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3710 | === Test Submit Rule |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3711 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3712 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/test.submit_rule' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3713 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3714 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3715 | Tests the submit_rule Prolog rule in the project, or the one given. |
| 3716 | |
| 3717 | Request body may be either the Prolog code as `text/plain` or a |
| 3718 | link:#rule-input[RuleInput] object. The query parameter `filters` |
| 3719 | may be set to `SKIP` to bypass parent project filters while testing |
| 3720 | a project-specific rule. |
| 3721 | |
| 3722 | .Request |
| 3723 | ---- |
Shawn Pearce | a3cce71 | 2014-03-21 08:16:11 -0700 | [diff] [blame] | 3724 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/test.submit_rule?filters=SKIP HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3725 | Content-Type: text/plain; charset-UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3726 | |
| 3727 | submit_rule(submit(R)) :- |
| 3728 | R = label('Any-Label-Name', reject(_)). |
| 3729 | ---- |
| 3730 | |
| 3731 | The response is a list of link:#submit-record[SubmitRecord] entries |
| 3732 | describing the permutations that satisfy the tested submit rule. |
| 3733 | |
| 3734 | .Response |
| 3735 | ---- |
| 3736 | HTTP/1.1 200 OK |
| 3737 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3738 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 3739 | |
| 3740 | )]}' |
| 3741 | [ |
| 3742 | { |
| 3743 | "status": "NOT_READY", |
| 3744 | "reject": { |
| 3745 | "Any-Label-Name": {} |
| 3746 | } |
| 3747 | } |
| 3748 | ] |
| 3749 | ---- |
| 3750 | |
Shawn Pearce | b42e303 | 2015-04-02 10:28:10 -0700 | [diff] [blame] | 3751 | When testing with the `curl` command line client the |
| 3752 | `--data-binary @rules.pl` flag should be used to ensure |
| 3753 | all LFs are included in the Prolog code: |
| 3754 | |
| 3755 | ---- |
| 3756 | curl -X POST \ |
| 3757 | -H 'Content-Type: text/plain; charset=UTF-8' \ |
| 3758 | --data-binary @rules.pl \ |
| 3759 | http://.../test.submit_rule |
| 3760 | ---- |
| 3761 | |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 3762 | [[list-drafts]] |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 3763 | === List Revision Drafts |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3764 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3765 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/drafts/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3766 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3767 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 3768 | Lists the draft comments of a revision that belong to the calling |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 3769 | user. |
| 3770 | |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 3771 | Returns a map of file paths to lists of link:#comment-info[CommentInfo] |
| 3772 | entries. The entries in the map are sorted by file path. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 3773 | |
| 3774 | .Request |
| 3775 | ---- |
| 3776 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/ HTTP/1.0 |
| 3777 | ---- |
| 3778 | |
| 3779 | .Response |
| 3780 | ---- |
| 3781 | HTTP/1.1 200 OK |
| 3782 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3783 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 3784 | |
| 3785 | )]}' |
| 3786 | { |
| 3787 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 3788 | { |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 3789 | "id": "TvcXrmjM", |
| 3790 | "line": 23, |
| 3791 | "message": "[nit] trailing whitespace", |
| 3792 | "updated": "2013-02-26 15:40:43.986000000" |
| 3793 | }, |
| 3794 | { |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 3795 | "id": "TveXwFiA", |
| 3796 | "line": 49, |
| 3797 | "in_reply_to": "TfYX-Iuo", |
| 3798 | "message": "Done", |
| 3799 | "updated": "2013-02-26 15:40:45.328000000" |
| 3800 | } |
| 3801 | ] |
| 3802 | } |
| 3803 | ---- |
| 3804 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3805 | [[create-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3806 | === Create Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3807 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3808 | 'PUT /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/drafts' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3809 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3810 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3811 | Creates a draft comment on a revision. |
| 3812 | |
| 3813 | The new draft comment must be provided in the request body inside a |
| 3814 | link:#comment-input[CommentInput] entity. |
| 3815 | |
| 3816 | .Request |
| 3817 | ---- |
| 3818 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3819 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3820 | |
| 3821 | { |
| 3822 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 3823 | "line": 23, |
| 3824 | "message": "[nit] trailing whitespace" |
| 3825 | } |
| 3826 | ---- |
| 3827 | |
| 3828 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 3829 | describes the draft comment. |
| 3830 | |
| 3831 | .Response |
| 3832 | ---- |
| 3833 | HTTP/1.1 200 OK |
| 3834 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3835 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3836 | |
| 3837 | )]}' |
| 3838 | { |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3839 | "id": "TvcXrmjM", |
| 3840 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 3841 | "line": 23, |
| 3842 | "message": "[nit] trailing whitespace", |
| 3843 | "updated": "2013-02-26 15:40:43.986000000" |
| 3844 | } |
| 3845 | ---- |
| 3846 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 3847 | [[get-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3848 | === Get Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3849 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3850 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/drafts/link:#draft-id[\{draft-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3851 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3852 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 3853 | Retrieves a draft comment of a revision that belongs to the calling |
| 3854 | user. |
| 3855 | |
| 3856 | .Request |
| 3857 | ---- |
| 3858 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/TvcXrmjM HTTP/1.0 |
| 3859 | ---- |
| 3860 | |
| 3861 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 3862 | describes the draft comment. |
| 3863 | |
| 3864 | .Response |
| 3865 | ---- |
| 3866 | HTTP/1.1 200 OK |
| 3867 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3868 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 3869 | |
| 3870 | )]}' |
| 3871 | { |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 3872 | "id": "TvcXrmjM", |
| 3873 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 3874 | "line": 23, |
| 3875 | "message": "[nit] trailing whitespace", |
| 3876 | "updated": "2013-02-26 15:40:43.986000000" |
| 3877 | } |
| 3878 | ---- |
| 3879 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3880 | [[update-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3881 | === Update Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3882 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3883 | 'PUT /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/drafts/link:#draft-id[\{draft-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3884 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3885 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3886 | Updates a draft comment on a revision. |
| 3887 | |
| 3888 | The new draft comment must be provided in the request body inside a |
| 3889 | link:#comment-input[CommentInput] entity. |
| 3890 | |
| 3891 | .Request |
| 3892 | ---- |
| 3893 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/TvcXrmjM HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3894 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3895 | |
| 3896 | { |
| 3897 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 3898 | "line": 23, |
| 3899 | "message": "[nit] trailing whitespace" |
| 3900 | } |
| 3901 | ---- |
| 3902 | |
| 3903 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 3904 | describes the draft comment. |
| 3905 | |
| 3906 | .Response |
| 3907 | ---- |
| 3908 | HTTP/1.1 200 OK |
| 3909 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3910 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3911 | |
| 3912 | )]}' |
| 3913 | { |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3914 | "id": "TvcXrmjM", |
| 3915 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 3916 | "line": 23, |
| 3917 | "message": "[nit] trailing whitespace", |
| 3918 | "updated": "2013-02-26 15:40:43.986000000" |
| 3919 | } |
| 3920 | ---- |
| 3921 | |
| 3922 | [[delete-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3923 | === Delete Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3924 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3925 | 'DELETE /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/drafts/link:#draft-id[\{draft-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3926 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3927 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 3928 | Deletes a draft comment from a revision. |
| 3929 | |
| 3930 | .Request |
| 3931 | ---- |
| 3932 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/TvcXrmjM HTTP/1.0 |
| 3933 | ---- |
| 3934 | |
| 3935 | .Response |
| 3936 | ---- |
| 3937 | HTTP/1.1 204 No Content |
| 3938 | ---- |
| 3939 | |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3940 | [[list-comments]] |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 3941 | === List Revision Comments |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3942 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3943 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/comments/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3944 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3945 | |
| 3946 | Lists the published comments of a revision. |
| 3947 | |
| 3948 | As result a map is returned that maps the file path to a list of |
| 3949 | link:#comment-info[CommentInfo] entries. The entries in the map are |
Khai Do | 23845a1 | 2014-06-02 11:28:16 -0700 | [diff] [blame] | 3950 | sorted by file path and only include file (or inline) comments. Use |
| 3951 | the link:#get-change-detail[Get Change Detail] endpoint to retrieve |
| 3952 | the general change message (or comment). |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3953 | |
| 3954 | .Request |
| 3955 | ---- |
| 3956 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/comments/ HTTP/1.0 |
| 3957 | ---- |
| 3958 | |
| 3959 | .Response |
| 3960 | ---- |
| 3961 | HTTP/1.1 200 OK |
| 3962 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3963 | Content-Type: application/json; charset=UTF-8 |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3964 | |
| 3965 | )]}' |
| 3966 | { |
| 3967 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 3968 | { |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3969 | "id": "TvcXrmjM", |
| 3970 | "line": 23, |
| 3971 | "message": "[nit] trailing whitespace", |
| 3972 | "updated": "2013-02-26 15:40:43.986000000", |
| 3973 | "author": { |
| 3974 | "_account_id": 1000096, |
| 3975 | "name": "John Doe", |
| 3976 | "email": "john.doe@example.com" |
| 3977 | } |
| 3978 | }, |
| 3979 | { |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3980 | "id": "TveXwFiA", |
| 3981 | "line": 49, |
| 3982 | "in_reply_to": "TfYX-Iuo", |
| 3983 | "message": "Done", |
| 3984 | "updated": "2013-02-26 15:40:45.328000000", |
| 3985 | "author": { |
| 3986 | "_account_id": 1000097, |
| 3987 | "name": "Jane Roe", |
| 3988 | "email": "jane.roe@example.com" |
| 3989 | } |
| 3990 | } |
| 3991 | ] |
| 3992 | } |
| 3993 | ---- |
| 3994 | |
| 3995 | [[get-comment]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3996 | === Get Comment |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3997 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 3998 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/comments/link:#comment-id[\{comment-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3999 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 4000 | |
| 4001 | Retrieves a published comment of a revision. |
| 4002 | |
| 4003 | .Request |
| 4004 | ---- |
| 4005 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/comments/TvcXrmjM HTTP/1.0 |
| 4006 | ---- |
| 4007 | |
| 4008 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 4009 | describes the published comment. |
| 4010 | |
| 4011 | .Response |
| 4012 | ---- |
| 4013 | HTTP/1.1 200 OK |
| 4014 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4015 | Content-Type: application/json; charset=UTF-8 |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 4016 | |
| 4017 | )]}' |
| 4018 | { |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 4019 | "id": "TvcXrmjM", |
| 4020 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4021 | "line": 23, |
| 4022 | "message": "[nit] trailing whitespace", |
| 4023 | "updated": "2013-02-26 15:40:43.986000000", |
| 4024 | "author": { |
| 4025 | "_account_id": 1000096, |
| 4026 | "name": "John Doe", |
| 4027 | "email": "john.doe@example.com" |
| 4028 | } |
| 4029 | } |
| 4030 | ---- |
| 4031 | |
Edwin Kempin | b050a48 | 2016-12-01 09:11:19 +0100 | [diff] [blame] | 4032 | [[list-robot-comments]] |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 4033 | === List Robot Comments |
| 4034 | -- |
| 4035 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/robotcomments/' |
| 4036 | -- |
| 4037 | |
| 4038 | Lists the link:config-robot-comments.html[robot comments] of a |
| 4039 | revision. |
| 4040 | |
| 4041 | As result a map is returned that maps the file path to a list of |
| 4042 | link:#robot-comment-info[RobotCommentInfo] entries. The entries in the |
| 4043 | map are sorted by file path. |
| 4044 | |
| 4045 | .Request |
| 4046 | ---- |
| 4047 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/robotcomments/ HTTP/1.0 |
| 4048 | ---- |
| 4049 | |
| 4050 | .Response |
| 4051 | ---- |
| 4052 | HTTP/1.1 200 OK |
| 4053 | Content-Disposition: attachment |
| 4054 | Content-Type: application/json; charset=UTF-8 |
| 4055 | |
| 4056 | )]}' |
| 4057 | { |
| 4058 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 4059 | { |
| 4060 | "id": "TvcXrmjM", |
| 4061 | "line": 23, |
| 4062 | "message": "unused import", |
| 4063 | "updated": "2016-02-26 15:40:43.986000000", |
| 4064 | "author": { |
| 4065 | "_account_id": 1000110, |
| 4066 | "name": "Code Analyzer", |
| 4067 | "email": "code.analyzer@example.com" |
| 4068 | }, |
| 4069 | "robotId": "importChecker", |
| 4070 | "robotRunId": "76b1375aa8626ea7149792831fe2ed85e80d9e04" |
| 4071 | }, |
| 4072 | { |
| 4073 | "id": "TveXwFiA", |
| 4074 | "line": 49, |
| 4075 | "message": "wrong indention", |
| 4076 | "updated": "2016-02-26 15:40:45.328000000", |
| 4077 | "author": { |
| 4078 | "_account_id": 1000110, |
| 4079 | "name": "Code Analyzer", |
| 4080 | "email": "code.analyzer@example.com" |
| 4081 | }, |
| 4082 | "robotId": "styleChecker", |
| 4083 | "robotRunId": "5c606c425dd45184484f9d0a2ffd725a7607839b" |
| 4084 | } |
| 4085 | ] |
| 4086 | } |
| 4087 | ---- |
| 4088 | |
| 4089 | [[get-robot-comment]] |
| 4090 | === Get Robot Comment |
| 4091 | -- |
| 4092 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/robotcomments/link:#comment-id[\{comment-id\}]' |
| 4093 | -- |
| 4094 | |
| 4095 | Retrieves a link:config-robot-comments.html[robot comment] of a |
| 4096 | revision. |
| 4097 | |
| 4098 | .Request |
| 4099 | ---- |
| 4100 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/robotcomments/TvcXrmjM HTTP/1.0 |
| 4101 | ---- |
| 4102 | |
| 4103 | As response a link:#robot-comment-info[RobotCommentInfo] entity is |
| 4104 | returned that describes the robot comment. |
| 4105 | |
| 4106 | .Response |
| 4107 | ---- |
| 4108 | HTTP/1.1 200 OK |
| 4109 | Content-Disposition: attachment |
| 4110 | Content-Type: application/json; charset=UTF-8 |
| 4111 | |
| 4112 | )]}' |
| 4113 | { |
| 4114 | "id": "TvcXrmjM", |
| 4115 | "line": 23, |
| 4116 | "message": "unused import", |
| 4117 | "updated": "2016-02-26 15:40:43.986000000", |
| 4118 | "author": { |
| 4119 | "_account_id": 1000110, |
| 4120 | "name": "Code Analyzer", |
| 4121 | "email": "code.analyzer@example.com" |
| 4122 | }, |
| 4123 | "robotId": "importChecker", |
| 4124 | "robotRunId": "76b1375aa8626ea7149792831fe2ed85e80d9e04" |
| 4125 | } |
| 4126 | ---- |
| 4127 | |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 4128 | [[list-files]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4129 | === List Files |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4130 | -- |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 4131 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4132 | -- |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 4133 | |
| 4134 | Lists the files that were modified, added or deleted in a revision. |
| 4135 | |
Edwin Kempin | 8fd96b9 | 2016-12-05 16:39:03 +0100 | [diff] [blame] | 4136 | In addition the following magic files are included: |
| 4137 | |
| 4138 | * `/COMMIT_MSG`: |
| 4139 | + |
| 4140 | The commit message and headers with the parent commit(s), the author |
| 4141 | information and the committer information. |
| 4142 | |
| 4143 | * `/MERGE_LIST` (for merge commits only): |
| 4144 | + |
| 4145 | The list of commits that are being integrated into the destination |
| 4146 | branch by submitting the merge commit. |
| 4147 | |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 4148 | .Request |
| 4149 | ---- |
| 4150 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/ HTTP/1.0 |
| 4151 | ---- |
| 4152 | |
| 4153 | As result a map is returned that maps the file path to a list of |
| 4154 | link:#file-info[FileInfo] entries. The entries in the map are |
| 4155 | sorted by file path. |
| 4156 | |
| 4157 | .Response |
| 4158 | ---- |
| 4159 | HTTP/1.1 200 OK |
| 4160 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4161 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 4162 | |
| 4163 | )]}' |
| 4164 | { |
| 4165 | "/COMMIT_MSG": { |
| 4166 | "status": "A", |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 4167 | "lines_inserted": 7, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 4168 | "size_delta": 551, |
| 4169 | "size": 551 |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 4170 | }, |
| 4171 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": { |
| 4172 | "lines_inserted": 5, |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 4173 | "lines_deleted": 3, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 4174 | "size_delta": 98, |
| 4175 | "size": 23348 |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 4176 | } |
| 4177 | } |
| 4178 | ---- |
| 4179 | |
Shawn Pearce | 984747d | 2013-07-18 00:42:16 -0700 | [diff] [blame] | 4180 | The request parameter `reviewed` changes the response to return a list |
| 4181 | of the paths the caller has marked as reviewed. Clients that also |
| 4182 | need the FileInfo should make two requests. |
| 4183 | |
Shawn Pearce | 8ca03a6 | 2015-01-02 22:03:20 -0800 | [diff] [blame] | 4184 | The request parameter `q` changes the response to return a list |
| 4185 | of all files (modified or unmodified) that contain that substring |
| 4186 | in the path name. This is useful to implement suggestion services |
| 4187 | finding a file by partial name. |
| 4188 | |
Dawid Grzegorczyk | 5904524 | 2015-11-07 11:26:02 +0100 | [diff] [blame] | 4189 | The integer-valued request parameter `parent` changes the response to return a |
| 4190 | list of the files which are different in this commit compared to the given |
| 4191 | parent commit. This is useful for supporting review of merge commits. The value |
| 4192 | is the 1-based index of the parent's position in the commit object. |
| 4193 | |
Shawn Pearce | 984747d | 2013-07-18 00:42:16 -0700 | [diff] [blame] | 4194 | .Request |
| 4195 | ---- |
| 4196 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/?reviewed HTTP/1.0 |
| 4197 | ---- |
| 4198 | |
| 4199 | .Response |
| 4200 | ---- |
| 4201 | HTTP/1.1 200 OK |
| 4202 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4203 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | 984747d | 2013-07-18 00:42:16 -0700 | [diff] [blame] | 4204 | |
| 4205 | )]}' |
| 4206 | [ |
| 4207 | "/COMMIT_MSG", |
| 4208 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4209 | ] |
| 4210 | ---- |
| 4211 | |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 4212 | [[get-content]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4213 | === Get Content |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4214 | -- |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4215 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/content' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4216 | -- |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 4217 | |
| 4218 | Gets the content of a file from a certain revision. |
| 4219 | |
| 4220 | .Request |
| 4221 | ---- |
| 4222 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 4223 | ---- |
| 4224 | |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 4225 | The content is returned as base64 encoded string. The HTTP response |
| 4226 | Content-Type is always `text/plain`, reflecting the base64 wrapping. |
| 4227 | A Gerrit-specific `X-FYI-Content-Type` header is returned describing |
| 4228 | the server detected content type of the file. |
| 4229 | |
| 4230 | If only the content type is required, callers should use HEAD to |
| 4231 | avoid downloading the encoded file contents. |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 4232 | |
| 4233 | .Response |
| 4234 | ---- |
| 4235 | HTTP/1.1 200 OK |
| 4236 | Content-Disposition: attachment |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 4237 | Content-Type: text/plain; charset=ISO-8859-1 |
| 4238 | X-FYI-Content-Encoding: base64 |
| 4239 | X-FYI-Content-Type: text/xml |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 4240 | |
| 4241 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 4242 | ---- |
| 4243 | |
David Ostrovsky | d007867 | 2015-02-06 21:51:04 +0100 | [diff] [blame] | 4244 | Alternatively, if the only value of the Accept request header is |
| 4245 | `application/json` the content is returned as JSON string and |
| 4246 | `X-FYI-Content-Encoding` is set to `json`. |
| 4247 | |
David Pletcher | d1efb45 | 2015-09-01 17:45:55 -0700 | [diff] [blame] | 4248 | [[get-safe-content]] |
| 4249 | === Download Content |
| 4250 | -- |
| 4251 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/download' |
| 4252 | -- |
| 4253 | |
| 4254 | Downloads the content of a file from a certain revision, in a safe format |
| 4255 | that poses no risk for inadvertent execution of untrusted code. |
| 4256 | |
| 4257 | If the content type is defined as safe, the binary file content is returned |
| 4258 | verbatim. If the content type is not safe, the file is stored inside a ZIP |
| 4259 | file, containing a single entry with a random, unpredictable name having the |
| 4260 | same base and suffix as the true filename. The ZIP file is returned in |
| 4261 | verbatim binary form. |
| 4262 | |
| 4263 | See link:config-gerrit.html#mimetype.name.safe[Gerrit config documentation] |
| 4264 | for information about safe file type configuration. |
| 4265 | |
| 4266 | The HTTP resource Content-Type is dependent on the file type: the |
| 4267 | applicable type for safe files, or "application/zip" for unsafe files. |
| 4268 | |
David Pletcher | ec622bf | 2015-09-18 14:30:05 -0700 | [diff] [blame] | 4269 | The optional, integer-valued `parent` parameter can be specified to request |
| 4270 | the named file from a parent commit of the specified revision. The value is |
| 4271 | the 1-based index of the parent's position in the commit object. If the |
| 4272 | parameter is omitted or the value non-positive, the patch set is referenced. |
| 4273 | |
| 4274 | Filenames are decorated with a suffix of `_new` for the current patch, |
| 4275 | `_old` for the only parent, or `_oldN` for the Nth parent of many. |
David Pletcher | d1efb45 | 2015-09-01 17:45:55 -0700 | [diff] [blame] | 4276 | |
| 4277 | .Request |
| 4278 | ---- |
David Pursehouse | 6147f6d | 2016-10-18 05:40:44 +0000 | [diff] [blame] | 4279 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/website%2Freleases%2Flogo.png/download HTTP/1.0 |
David Pletcher | d1efb45 | 2015-09-01 17:45:55 -0700 | [diff] [blame] | 4280 | ---- |
| 4281 | |
| 4282 | .Response |
| 4283 | ---- |
| 4284 | HTTP/1.1 200 OK |
| 4285 | Content-Disposition: attachment; filename="logo.png" |
| 4286 | Content-Type: image/png |
| 4287 | |
| 4288 | `[binary data for logo.png]` |
| 4289 | ---- |
| 4290 | |
| 4291 | .Request |
| 4292 | ---- |
David Pursehouse | 6147f6d | 2016-10-18 05:40:44 +0000 | [diff] [blame] | 4293 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/download?suffix=new HTTP/1.0 |
David Pletcher | d1efb45 | 2015-09-01 17:45:55 -0700 | [diff] [blame] | 4294 | ---- |
| 4295 | |
| 4296 | .Response |
| 4297 | ---- |
| 4298 | HTTP/1.1 200 OK |
| 4299 | Content-Disposition: Content-Disposition:attachment; filename="RefControl_new-931cdb73ae9d97eb500a3533455b055d90b99944.java.zip" |
| 4300 | Content-Type:application/zip |
| 4301 | |
| 4302 | `[binary ZIP archive containing a single file, "RefControl_new-cb218df1337df48a0e7ab30a49a8067ac7321881.java"]` |
| 4303 | ---- |
| 4304 | |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4305 | [[get-diff]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4306 | === Get Diff |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4307 | -- |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4308 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/diff' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4309 | -- |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4310 | |
| 4311 | Gets the diff of a file from a certain revision. |
| 4312 | |
| 4313 | .Request |
| 4314 | ---- |
| 4315 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/diff HTTP/1.0 |
| 4316 | ---- |
| 4317 | |
| 4318 | As response a link:#diff-info[DiffInfo] entity is returned that describes the diff. |
| 4319 | |
| 4320 | .Response |
| 4321 | ---- |
| 4322 | HTTP/1.1 200 OK |
| 4323 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4324 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4325 | |
| 4326 | )] |
| 4327 | { |
| 4328 | "meta_a": { |
| 4329 | "name": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
Shawn Pearce | d62a6a9 | 2013-12-05 12:45:32 -0800 | [diff] [blame] | 4330 | "content_type": "text/x-java-source", |
| 4331 | "lines": 372 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4332 | }, |
| 4333 | "meta_b": { |
| 4334 | "name": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
Shawn Pearce | d62a6a9 | 2013-12-05 12:45:32 -0800 | [diff] [blame] | 4335 | "content_type": "text/x-java-source", |
| 4336 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4337 | }, |
| 4338 | "change_type": "MODIFIED", |
| 4339 | "diff_header": [ |
| 4340 | "diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4341 | "index 59b7670..9faf81c 100644", |
| 4342 | "--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4343 | "+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java" |
| 4344 | ], |
| 4345 | "content": [ |
| 4346 | { |
| 4347 | "ab": [ |
| 4348 | "// Copyright (C) 2010 The Android Open Source Project", |
| 4349 | "//", |
| 4350 | "// Licensed under the Apache License, Version 2.0 (the \"License\");", |
| 4351 | "// you may not use this file except in compliance with the License.", |
| 4352 | "// You may obtain a copy of the License at", |
| 4353 | "//", |
| 4354 | "// http://www.apache.org/licenses/LICENSE-2.0", |
| 4355 | "//", |
| 4356 | "// Unless required by applicable law or agreed to in writing, software", |
| 4357 | "// distributed under the License is distributed on an \"AS IS\" BASIS,", |
| 4358 | "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", |
| 4359 | "// See the License for the specific language governing permissions and", |
| 4360 | "// limitations under the License." |
| 4361 | ] |
| 4362 | }, |
| 4363 | { |
| 4364 | "b": [ |
| 4365 | "//", |
| 4366 | "// Add some more lines in the header." |
| 4367 | ] |
| 4368 | }, |
| 4369 | { |
| 4370 | "ab": [ |
| 4371 | "", |
| 4372 | "package com.google.gerrit.server.project;", |
| 4373 | "", |
| 4374 | "import com.google.common.collect.Maps;", |
| 4375 | ... |
| 4376 | ] |
| 4377 | } |
| 4378 | ... |
| 4379 | ] |
| 4380 | } |
| 4381 | ---- |
| 4382 | |
| 4383 | If the `intraline` parameter is specified, intraline differences are included in the diff. |
| 4384 | |
| 4385 | .Request |
| 4386 | ---- |
| 4387 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/b6b9c10649b9041884046119ab794374470a1b45/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/diff?intraline HTTP/1.0 |
| 4388 | ---- |
| 4389 | |
| 4390 | .Response |
| 4391 | ---- |
| 4392 | HTTP/1.1 200 OK |
| 4393 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4394 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4395 | |
| 4396 | )] |
| 4397 | { |
| 4398 | "meta_a": { |
| 4399 | "name": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
Shawn Pearce | d62a6a9 | 2013-12-05 12:45:32 -0800 | [diff] [blame] | 4400 | "content_type": "text/x-java-source", |
| 4401 | "lines": 372 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4402 | }, |
| 4403 | "meta_b": { |
| 4404 | "name": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
Shawn Pearce | d62a6a9 | 2013-12-05 12:45:32 -0800 | [diff] [blame] | 4405 | "content_type": "text/x-java-source", |
| 4406 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4407 | }, |
| 4408 | "change_type": "MODIFIED", |
| 4409 | "diff_header": [ |
| 4410 | "diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4411 | "index 59b7670..9faf81c 100644", |
| 4412 | "--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4413 | "+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java" |
| 4414 | ], |
| 4415 | "content": [ |
| 4416 | ... |
| 4417 | { |
| 4418 | "a": [ |
| 4419 | "/** Manages access control for Git references (aka branches, tags). */" |
| 4420 | ], |
| 4421 | "b": [ |
| 4422 | "/** Manages access control for the Git references (aka branches, tags). */" |
| 4423 | ], |
| 4424 | "edit_a": [], |
| 4425 | "edit_b": [ |
| 4426 | [ |
| 4427 | 31, |
| 4428 | 4 |
| 4429 | ] |
| 4430 | ] |
| 4431 | } |
| 4432 | ] |
| 4433 | } |
| 4434 | ---- |
| 4435 | |
| 4436 | The `base` parameter can be specified to control the base patch set from which the diff should |
| 4437 | be generated. |
| 4438 | |
Dawid Grzegorczyk | 5904524 | 2015-11-07 11:26:02 +0100 | [diff] [blame] | 4439 | The integer-valued request parameter `parent` can be specified to control the |
| 4440 | parent commit number against which the diff should be generated. This is useful |
| 4441 | for supporting review of merge commits. The value is the 1-based index of the |
| 4442 | parent's position in the commit object. |
| 4443 | |
Edwin Kempin | 8cdce50 | 2014-12-06 10:55:38 +0100 | [diff] [blame] | 4444 | [[weblinks-only]] |
| 4445 | If the `weblinks-only` parameter is specified, only the diff web links are returned. |
| 4446 | |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4447 | .Request |
| 4448 | ---- |
| 4449 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/b6b9c10649b9041884046119ab794374470a1b45/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/diff?base=2 HTTP/1.0 |
| 4450 | ---- |
| 4451 | |
| 4452 | .Response |
| 4453 | ---- |
| 4454 | HTTP/1.1 200 OK |
| 4455 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4456 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4457 | |
| 4458 | )] |
| 4459 | { |
| 4460 | "meta_a": { |
| 4461 | "name": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
Shawn Pearce | d62a6a9 | 2013-12-05 12:45:32 -0800 | [diff] [blame] | 4462 | "content_type": "text/x-java-source", |
| 4463 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4464 | }, |
| 4465 | "meta_b": { |
| 4466 | "name": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
Shawn Pearce | d62a6a9 | 2013-12-05 12:45:32 -0800 | [diff] [blame] | 4467 | "content_type": "text/x-java-source", |
| 4468 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4469 | }, |
| 4470 | "change_type": "MODIFIED", |
| 4471 | "content": [ |
| 4472 | { |
| 4473 | "skip": 578 |
| 4474 | } |
| 4475 | ] |
| 4476 | } |
| 4477 | ---- |
| 4478 | |
Edwin Kempin | 0b7c40f | 2016-02-09 17:13:23 +0100 | [diff] [blame] | 4479 | The `whitespace` parameter can be specified to control how whitespace |
| 4480 | differences are reported in the result. Valid values are `IGNORE_NONE`, |
| 4481 | `IGNORE_TRAILING`, `IGNORE_LEADING_AND_TRAILING` or `IGNORE_ALL`. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 4482 | |
| 4483 | The `context` parameter can be specified to control the number of lines of surrounding context |
| 4484 | in the diff. Valid values are `ALL` or number of lines. |
| 4485 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 4486 | [[get-blame]] |
| 4487 | === Get Blame |
| 4488 | -- |
| 4489 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/blame' |
| 4490 | -- |
| 4491 | |
| 4492 | Gets the blame of a file from a certain revision. |
| 4493 | |
| 4494 | .Request |
| 4495 | ---- |
| 4496 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/blame HTTP/1.0 |
| 4497 | ---- |
| 4498 | |
| 4499 | As response a link:#blame-info[BlameInfo] entity is returned that describes the |
| 4500 | blame. |
| 4501 | |
| 4502 | .Response |
| 4503 | ---- |
| 4504 | HTTP/1.1 200 OK |
| 4505 | Content-Disposition: attachment |
| 4506 | Content-Type: application/json; charset=UTF-8 |
| 4507 | |
| 4508 | )] |
| 4509 | { |
| 4510 | [ |
| 4511 | { |
| 4512 | "author": "Joe Daw", |
| 4513 | "id": "64e140b4de5883a4dd74d06c2b62ccd7ffd224a7", |
| 4514 | "time": 1421441349, |
| 4515 | "commit_msg": "RST test\n\nChange-Id: I11e9e24bd122253f4bb10c36dce825ac2410d646\n", |
| 4516 | "ranges": [ |
| 4517 | { |
| 4518 | "start": 1, |
| 4519 | "end": 10 |
| 4520 | }, |
| 4521 | { |
| 4522 | "start": 16, |
| 4523 | "end": 296 |
| 4524 | } |
| 4525 | ] |
| 4526 | }, |
| 4527 | { |
| 4528 | "author": "Jane Daw", |
| 4529 | "id": "8d52621a0e2ac6adec73bd3a49f2371cd53137a7", |
| 4530 | "time": 1421825421, |
| 4531 | "commit_msg": "add banner\n\nChange-Id: I2eced9b2691015ae3c5138f4d0c4ca2b8fb15be9\n", |
| 4532 | "ranges": [ |
| 4533 | { |
| 4534 | "start": 13, |
| 4535 | "end": 13 |
| 4536 | } |
| 4537 | ] |
| 4538 | } |
| 4539 | ] |
| 4540 | } |
| 4541 | ---- |
| 4542 | |
| 4543 | The `base` parameter can be specified to control the base patch set from which |
| 4544 | the blame should be generated. |
| 4545 | |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 4546 | [[set-reviewed]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4547 | === Set Reviewed |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4548 | -- |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4549 | 'PUT /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/reviewed' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4550 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4551 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4552 | Marks a file of a revision as reviewed by the calling user. |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 4553 | |
| 4554 | .Request |
| 4555 | ---- |
| 4556 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/reviewed HTTP/1.0 |
| 4557 | ---- |
| 4558 | |
| 4559 | .Response |
| 4560 | ---- |
| 4561 | HTTP/1.1 201 Created |
| 4562 | ---- |
| 4563 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4564 | If the file was already marked as reviewed by the calling user the |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 4565 | response is "`200 OK`". |
| 4566 | |
| 4567 | [[delete-reviewed]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4568 | === Delete Reviewed |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4569 | -- |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4570 | 'DELETE /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/reviewed' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4571 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4572 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4573 | Deletes the reviewed flag of the calling user from a file of a revision. |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 4574 | |
| 4575 | .Request |
| 4576 | ---- |
| 4577 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/reviewed HTTP/1.0 |
| 4578 | ---- |
| 4579 | |
| 4580 | .Response |
| 4581 | ---- |
| 4582 | HTTP/1.1 204 No Content |
| 4583 | ---- |
| 4584 | |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4585 | [[cherry-pick]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4586 | === Cherry Pick Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4587 | -- |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4588 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/cherrypick' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4589 | -- |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4590 | |
| 4591 | Cherry picks a revision to a destination branch. |
| 4592 | |
| 4593 | The commit message and destination branch must be provided in the request body inside a |
| 4594 | link:#cherrypick-input[CherryPickInput] entity. |
| 4595 | |
| 4596 | .Request |
| 4597 | ---- |
| 4598 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/cherrypick HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4599 | Content-Type: application/json; charset=UTF-8 |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4600 | |
| 4601 | { |
Gustaf Lundh | 98df5b5 | 2013-05-07 19:22:13 +0100 | [diff] [blame] | 4602 | "message" : "Implementing Feature X", |
| 4603 | "destination" : "release-branch" |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4604 | } |
| 4605 | ---- |
| 4606 | |
| 4607 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 4608 | describes the resulting cherry picked change. |
| 4609 | |
| 4610 | .Response |
| 4611 | ---- |
| 4612 | HTTP/1.1 200 OK |
| 4613 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4614 | Content-Type: application/json; charset=UTF-8 |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4615 | |
| 4616 | )]}' |
| 4617 | { |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4618 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 4619 | "project": "myProject", |
| 4620 | "branch": "release-branch", |
| 4621 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 4622 | "subject": "Implementing Feature X", |
| 4623 | "status": "NEW", |
| 4624 | "created": "2013-02-01 09:59:32.126000000", |
| 4625 | "updated": "2013-02-21 11:16:36.775000000", |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4626 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 4627 | "insertions": 12, |
| 4628 | "deletions": 11, |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 4629 | "_number": 3965, |
| 4630 | "owner": { |
| 4631 | "name": "John Doe" |
| 4632 | } |
| 4633 | } |
| 4634 | ---- |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 4635 | |
David Pursehouse | d9dac37 | 2016-11-24 19:41:10 +0900 | [diff] [blame] | 4636 | [[get-hashtags]] |
| 4637 | === Get Hashtags |
| 4638 | -- |
| 4639 | 'GET /changes/link:#change-id[\{change-id\}]/hashtags' |
| 4640 | -- |
| 4641 | |
| 4642 | Gets the hashtags associated with a change. |
| 4643 | |
| 4644 | [NOTE] Hashtags are only available when NoteDb is enabled. |
| 4645 | |
| 4646 | .Request |
| 4647 | ---- |
| 4648 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/hashtags HTTP/1.0 |
| 4649 | ---- |
| 4650 | |
| 4651 | As response the change's hashtags are returned as a list of strings. |
| 4652 | |
| 4653 | .Response |
| 4654 | ---- |
| 4655 | HTTP/1.1 200 OK |
| 4656 | Content-Disposition: attachment |
| 4657 | Content-Type: application/json; charset=UTF-8 |
| 4658 | |
| 4659 | )]}' |
| 4660 | [ |
| 4661 | "hashtag1", |
| 4662 | "hashtag2" |
| 4663 | ] |
| 4664 | ---- |
| 4665 | |
| 4666 | [[set-hashtags]] |
| 4667 | === Set Hashtags |
| 4668 | -- |
| 4669 | 'POST /changes/link:#change-id[\{change-id\}]/hashtags' |
| 4670 | -- |
| 4671 | |
| 4672 | Adds and/or removes hashtags from a change. |
| 4673 | |
| 4674 | [NOTE] Hashtags are only available when NoteDb is enabled. |
| 4675 | |
| 4676 | The hashtags to add or remove must be provided in the request body inside a |
| 4677 | link:#hashtags-input[HashtagsInput] entity. |
| 4678 | |
| 4679 | .Request |
| 4680 | ---- |
| 4681 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/hashtags HTTP/1.0 |
| 4682 | Content-Type: application/json; charset=UTF-8 |
| 4683 | |
| 4684 | { |
| 4685 | "add" : [ |
| 4686 | "hashtag3" |
| 4687 | ], |
| 4688 | "remove" : [ |
| 4689 | "hashtag2" |
| 4690 | ] |
| 4691 | } |
| 4692 | ---- |
| 4693 | |
| 4694 | As response the change's hashtags are returned as a list of strings. |
| 4695 | |
| 4696 | .Response |
| 4697 | ---- |
| 4698 | HTTP/1.1 200 OK |
| 4699 | Content-Disposition: attachment |
| 4700 | Content-Type: application/json; charset=UTF-8 |
| 4701 | |
| 4702 | )]}' |
| 4703 | [ |
| 4704 | "hashtag1", |
| 4705 | "hashtag3" |
| 4706 | ] |
| 4707 | ---- |
| 4708 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 4709 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4710 | == IDs |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 4711 | |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 4712 | [[account-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4713 | === link:rest-api-accounts.html#account-id[\{account-id\}] |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 4714 | -- |
| 4715 | -- |
| 4716 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 4717 | [[change-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4718 | === \{change-id\} |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 4719 | Identifier that uniquely identifies one change. |
| 4720 | |
| 4721 | This can be: |
| 4722 | |
| 4723 | * an ID of the change in the format "'$$<project>~<branch>~<Change-Id>$$'", |
| 4724 | where for the branch the `refs/heads/` prefix can be omitted |
| 4725 | ("$$myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940$$") |
| 4726 | * a Change-Id if it uniquely identifies one change |
| 4727 | ("I8473b95934b5732ac55d26311a706c9c2bde9940") |
| 4728 | * a legacy numeric change ID ("4247") |
| 4729 | |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 4730 | [[comment-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4731 | === \{comment-id\} |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 4732 | UUID of a published comment. |
| 4733 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 4734 | [[draft-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4735 | === \{draft-id\} |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 4736 | UUID of a draft comment. |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 4737 | |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 4738 | [[label-id]] |
| 4739 | === \{label-id\} |
| 4740 | The name of the label. |
| 4741 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4742 | [[file-id]] |
| 4743 | \{file-id\} |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 4744 | ~~~~~~~~~~~~ |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 4745 | The path of the file. |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 4746 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4747 | [[revision-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4748 | === \{revision-id\} |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4749 | Identifier that uniquely identifies one revision of a change. |
| 4750 | |
| 4751 | This can be: |
| 4752 | |
Shawn Pearce | 9c0722a | 2013-03-02 15:30:31 -0800 | [diff] [blame] | 4753 | * the literal `current` to name the current patch set/revision |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4754 | * a commit ID ("674ac754f91e64a0efb8087e59a176484bd534d1") |
| 4755 | * an abbreviated commit ID that uniquely identifies one revision of the |
| 4756 | change ("674ac754"), at least 4 digits are required |
| 4757 | * a legacy numeric patch number ("1" for first patch set of the change) |
Edwin Kempin | 8cc0bab | 2016-09-15 15:53:37 +0200 | [diff] [blame] | 4758 | * "0" or the literal `edit` for a change edit |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4759 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4760 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4761 | == JSON Entities |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4762 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 4763 | [[abandon-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4764 | === AbandonInput |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 4765 | The `AbandonInput` entity contains information for abandoning a change. |
| 4766 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4767 | [options="header",cols="1,^1,5"] |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 4768 | |=========================== |
| 4769 | |Field Name ||Description |
| 4770 | |`message` |optional| |
| 4771 | Message to be added as review comment to the change when abandoning the |
| 4772 | change. |
Stephen Li | e5fcdf7 | 2016-08-02 11:05:11 -0700 | [diff] [blame] | 4773 | |`notify` |optional| |
| 4774 | Notify handling that defines to whom email notifications should be sent after |
| 4775 | the change is abandoned. + |
| 4776 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 4777 | If not set, the default is `ALL`. |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 4778 | |=========================== |
| 4779 | |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 4780 | [[action-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4781 | === ActionInfo |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 4782 | The `ActionInfo` entity describes a REST API call the client can |
| 4783 | make to manipulate a resource. These are frequently implemented by |
| 4784 | plugins and may be discovered at runtime. |
| 4785 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4786 | [options="header",cols="1,^1,5"] |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 4787 | |==================================== |
| 4788 | |Field Name ||Description |
| 4789 | |`method` |optional| |
| 4790 | HTTP method to use with the action. Most actions use `POST`, `PUT` |
| 4791 | or `DELETE` to cause state changes. |
| 4792 | |`label` |optional| |
| 4793 | Short title to display to a user describing the action. In the |
| 4794 | Gerrit web interface the label is used as the text on the button |
| 4795 | presented in the UI. |
| 4796 | |`title` |optional| |
| 4797 | Longer text to display describing the action. In a web UI this |
| 4798 | should be the title attribute of the element, displaying when |
| 4799 | the user hovers the mouse. |
| 4800 | |`enabled` |optional| |
| 4801 | If true the action is permitted at this time and the caller is |
| 4802 | likely allowed to execute it. This may change if state is updated |
| 4803 | at the server or permissions are modified. Not present if false. |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 4804 | |==================================== |
| 4805 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 4806 | [[add-reviewer-result]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4807 | === AddReviewerResult |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 4808 | The `AddReviewerResult` entity describes the result of adding a |
| 4809 | reviewer to a change. |
| 4810 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4811 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 4812 | |=========================== |
| 4813 | |Field Name ||Description |
Logan Hanks | 23e7028 | 2016-07-06 14:31:56 -0700 | [diff] [blame] | 4814 | |`input` || |
| 4815 | Value of the `reviewer` field from link:#reviewer-input[ReviewerInput] |
| 4816 | set while adding the reviewer. |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 4817 | |`reviewers` |optional| |
| 4818 | The newly added reviewers as a list of link:#reviewer-info[ |
| 4819 | ReviewerInfo] entities. |
Logan Hanks | ee0a418 | 2016-07-06 14:39:26 -0700 | [diff] [blame] | 4820 | |`ccs` |optional| |
| 4821 | The newly CCed accounts as a list of link:#reviewer-info[ |
| 4822 | ReviewerInfo] entities. This field will only appear if the requested |
| 4823 | `state` for the reviewer was `CC` *and* NoteDb is enabled on the |
| 4824 | server. |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 4825 | |`error` |optional| |
| 4826 | Error message explaining why the reviewer could not be added. + |
| 4827 | If a group was specified in the input and an error is returned, it |
| 4828 | means that none of the members were added as reviewer. |
| 4829 | |`confirm` |`false` if not set| |
| 4830 | Whether adding the reviewer requires confirmation. |
| 4831 | |=========================== |
| 4832 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4833 | [[approval-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4834 | === ApprovalInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4835 | The `ApprovalInfo` entity contains information about an approval from a |
| 4836 | user for a label on a change. |
| 4837 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 4838 | `ApprovalInfo` has the same fields as |
| 4839 | link:rest-api-accounts.html#account-info[AccountInfo]. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4840 | In addition `ApprovalInfo` has the following fields: |
| 4841 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4842 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4843 | |=========================== |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 4844 | |Field Name ||Description |
| 4845 | |`value` |optional| |
Dave Borowitz | a30db91 | 2013-03-22 14:20:33 -0700 | [diff] [blame] | 4846 | The vote that the user has given for the label. If present and zero, the |
| 4847 | user is permitted to vote on the label. If absent, the user is not |
| 4848 | permitted to vote on that label. |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 4849 | |`permitted_voting_range` |optional| |
| 4850 | The link:#voting-range-info[VotingRangeInfo] the user is authorized to vote |
| 4851 | on that label. If present, the user is permitted to vote on the label |
| 4852 | regarding the range values. If absent, the user is not permitted to vote |
| 4853 | on that label. |
| 4854 | |`date` |optional| |
Gustaf Lundh | 2e07d502 | 2013-05-08 17:07:42 +0100 | [diff] [blame] | 4855 | The time and date describing when the approval was made. |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 4856 | |`tag` |optional| |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 4857 | Value of the `tag` field from link:#review-input[ReviewInput] set |
| 4858 | while posting the review. |
| 4859 | NOTE: To apply different tags on on different votes/comments multiple |
| 4860 | invocations of the REST call are required. |
Dave Borowitz | e47fe47 | 2016-09-09 13:57:14 -0400 | [diff] [blame] | 4861 | |`post_submit` |not set if `false`| |
| 4862 | If true, this vote was made after the change was submitted. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4863 | |=========================== |
| 4864 | |
Sven Selberg | 273a4aa | 2016-09-21 16:28:10 +0200 | [diff] [blame] | 4865 | [[assignee-input]] |
| 4866 | === AssigneeInput |
| 4867 | The `AssigneeInput` entity contains the identity of the user to be set as assignee. |
| 4868 | |
| 4869 | [options="header",cols="1,^1,5"] |
| 4870 | |=========================== |
| 4871 | |Field Name ||Description |
| 4872 | |`assignee` || |
| 4873 | The link:rest-api-accounts.html#account-id[ID] of one account that |
| 4874 | should be added as assignee. |
| 4875 | |=========================== |
| 4876 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 4877 | [[blame-info]] |
| 4878 | === BlameInfo |
| 4879 | The `BlameInfo` entity stores the commit metadata with the row coordinates where |
| 4880 | it applies. |
| 4881 | |
| 4882 | [options="header",cols="1,6"] |
| 4883 | |=========================== |
| 4884 | |Field Name | Description |
| 4885 | |`author` | The author of the commit. |
| 4886 | |`id` | The id of the commit. |
| 4887 | |`time` | Commit time. |
| 4888 | |`commit_msg` | The commit message. |
| 4889 | |`ranges` | |
| 4890 | The blame row coordinates as link:#range-info[RangeInfo] entities. |
| 4891 | |=========================== |
| 4892 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 4893 | [[change-edit-input]] |
| 4894 | === ChangeEditInput |
| 4895 | The `ChangeEditInput` entity contains information for restoring a |
| 4896 | path within change edit. |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 4897 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 4898 | [options="header",cols="1,^1,5"] |
| 4899 | |=========================== |
| 4900 | |Field Name ||Description |
| 4901 | |`restore_path`|optional|Path to file to restore. |
| 4902 | |`old_path` |optional|Old path to file to rename. |
| 4903 | |`new_path` |optional|New path to file to rename. |
| 4904 | |=========================== |
| 4905 | |
| 4906 | [[change-edit-message-input]] |
| 4907 | === ChangeEditMessageInput |
| 4908 | The `ChangeEditMessageInput` entity contains information for changing |
| 4909 | the commit message within a change edit. |
| 4910 | |
| 4911 | [options="header",cols="1,^1,5"] |
| 4912 | |=========================== |
| 4913 | |Field Name ||Description |
| 4914 | |`message` ||New commit message. |
| 4915 | |=========================== |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 4916 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4917 | [[change-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4918 | === ChangeInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4919 | The `ChangeInfo` entity contains information about a change. |
| 4920 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4921 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4922 | |================================== |
| 4923 | |Field Name ||Description |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4924 | |`id` || |
| 4925 | The ID of the change in the format "'<project>\~<branch>~<Change-Id>'", |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 4926 | where 'project', 'branch' and 'Change-Id' are URL encoded. For 'branch' the |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4927 | `refs/heads/` prefix is omitted. |
| 4928 | |`project` ||The name of the project. |
| 4929 | |`branch` || |
| 4930 | The name of the target branch. + |
| 4931 | The `refs/heads/` prefix is omitted. |
Edwin Kempin | cd6c01a1 | 2013-02-21 14:58:52 +0100 | [diff] [blame] | 4932 | |`topic` |optional|The topic to which this change belongs. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4933 | |`change_id` ||The Change-Id of the change. |
| 4934 | |`subject` || |
| 4935 | The subject of the change (header line of the commit message). |
| 4936 | |`status` || |
Stefan Beller | 0d3cab0 | 2015-07-10 13:32:57 -0700 | [diff] [blame] | 4937 | The status of the change (`NEW`, `MERGED`, `ABANDONED`, `DRAFT`). |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4938 | |`created` || |
| 4939 | The link:rest-api.html#timestamp[timestamp] of when the change was |
| 4940 | created. |
| 4941 | |`updated` || |
| 4942 | The link:rest-api.html#timestamp[timestamp] of when the change was last |
| 4943 | updated. |
Khai Do | 96a7caf | 2016-01-07 14:07:54 -0800 | [diff] [blame] | 4944 | |`submitted` |only set for merged changes| |
| 4945 | The link:rest-api.html#timestamp[timestamp] of when the change was |
| 4946 | submitted. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4947 | |`starred` |not set if `false`| |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 4948 | Whether the calling user has starred this change with the default label. |
| 4949 | |`stars` |optional| |
| 4950 | A list of star labels that are applied by the calling user to this |
| 4951 | change. The labels are lexicographically sorted. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4952 | |`reviewed` |not set if `false`| |
| 4953 | Whether the change was reviewed by the calling user. |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 4954 | Only set if link:#reviewed[reviewed] is requested. |
Dave Borowitz | ace3210 | 2015-12-17 13:08:25 -0500 | [diff] [blame] | 4955 | |`submit_type` |optional| |
| 4956 | The link:project-configuration.html#submit_type[submit type] of the change. + |
| 4957 | Not set for merged changes. |
Edwin Kempin | baf70e1 | 2013-02-27 10:36:13 +0100 | [diff] [blame] | 4958 | |`mergeable` |optional| |
| 4959 | Whether the change is mergeable. + |
Dave Borowitz | e5fbeeb | 2014-06-27 09:47:49 -0700 | [diff] [blame] | 4960 | Not set for merged changes, or if the change has not yet been tested. |
Shawn Pearce | 4cd05b2 | 2016-09-17 22:45:33 -0700 | [diff] [blame] | 4961 | |`submittable` |optional| |
| 4962 | Whether the change has been approved by the project submit rules. + |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 4963 | Only set if link:#submittable[requested]. |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 4964 | |`insertions` || |
| 4965 | Number of inserted lines. |
| 4966 | |`deletions` || |
| 4967 | Number of deleted lines. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4968 | |`_number` ||The legacy numeric ID of the change. |
| 4969 | |`owner` || |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 4970 | The owner of the change as an link:rest-api-accounts.html#account-info[ |
| 4971 | AccountInfo] entity. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 4972 | |`actions` |optional| |
| 4973 | Actions the caller might be able to perform on this revision. The |
| 4974 | information is a map of view name to link:#action-info[ActionInfo] |
| 4975 | entities. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4976 | |`labels` |optional| |
| 4977 | The labels of the change as a map that maps the label names to |
| 4978 | link:#label-info[LabelInfo] entries. + |
| 4979 | Only set if link:#labels[labels] or link:#detailed-labels[detailed |
| 4980 | labels] are requested. |
| 4981 | |`permitted_labels` |optional| |
| 4982 | A map of the permitted labels that maps a label name to the list of |
| 4983 | values that are allowed for that label. + |
| 4984 | Only set if link:#detailed-labels[detailed labels] are requested. |
| 4985 | |`removable_reviewers`|optional| |
| 4986 | The reviewers that can be removed by the calling user as a list of |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 4987 | link:rest-api-accounts.html#account-info[AccountInfo] entities. + |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 4988 | Only set if link:#detailed-labels[detailed labels] are requested. |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 4989 | |`reviewers` || |
| 4990 | The reviewers as a map that maps a reviewer state to a list of |
| 4991 | link:rest-api-accounts.html#account-info[AccountInfo] entities. |
| 4992 | Possible reviewer states are `REVIEWER`, `CC` and `REMOVED`. + |
| 4993 | `REVIEWER`: Users with at least one non-zero vote on the change. + |
| 4994 | `CC`: Users that were added to the change, but have not voted. + |
| 4995 | `REMOVED`: Users that were previously reviewers on the change, but have |
| 4996 | been removed. + |
| 4997 | Only set if link:#detailed-labels[detailed labels] are requested. |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 4998 | |`reviewer_updates`|optional| |
| 4999 | Updates to reviewers set for the change as |
| 5000 | link:#review-update-info[ReviewerUpdateInfo] entities. |
| 5001 | Only set if link:#reviewer-updates[reviewer updates] are requested and |
| 5002 | if NoteDb is enabled. |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 5003 | |`messages`|optional| |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 5004 | Messages associated with the change as a list of |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 5005 | link:#change-message-info[ChangeMessageInfo] entities. + |
| 5006 | Only set if link:#messages[messages] are requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5007 | |`current_revision` |optional| |
| 5008 | The commit ID of the current patch set of this change. + |
| 5009 | Only set if link:#current-revision[the current revision] is requested |
| 5010 | or if link:#all-revisions[all revisions] are requested. |
| 5011 | |`revisions` |optional| |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 5012 | All patch sets of this change as a map that maps the commit ID of the |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5013 | patch set to a link:#revision-info[RevisionInfo] entity. + |
Dave Borowitz | 0adf270 | 2014-01-22 10:41:52 -0800 | [diff] [blame] | 5014 | Only set if link:#current-revision[the current revision] is requested |
| 5015 | (in which case it will only contain a key for the current revision) or |
| 5016 | if link:#all-revisions[all revisions] are requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5017 | |`_more_changes` |optional, not set if `false`| |
| 5018 | Whether the query would deliver more results if not limited. + |
Dave Borowitz | 4241459 | 2014-12-19 11:27:14 -0800 | [diff] [blame] | 5019 | Only set on the last change that is returned. |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 5020 | |`problems` |optional| |
| 5021 | A list of link:#problem-info[ProblemInfo] entities describing potential |
Dave Borowitz | 4c46c24 | 2014-12-03 16:46:45 -0800 | [diff] [blame] | 5022 | problems with this change. Only set if link:#check[CHECK] is set. |
Yuxuan 'fishy' Wang | af6807f | 2016-02-10 15:11:57 -0800 | [diff] [blame] | 5023 | |================================== |
| 5024 | |
| 5025 | [[change-input]] |
| 5026 | === ChangeInput |
| 5027 | The `ChangeInput` entity contains information about creating a new change. |
| 5028 | |
| 5029 | [options="header",cols="1,^1,5"] |
| 5030 | |================================== |
| 5031 | |Field Name ||Description |
| 5032 | |`project` ||The name of the project. |
| 5033 | |`branch` || |
| 5034 | The name of the target branch. + |
| 5035 | The `refs/heads/` prefix is omitted. |
| 5036 | |`subject` || |
| 5037 | The subject of the change (header line of the commit message). |
| 5038 | |`topic` |optional|The topic to which this change belongs. |
| 5039 | |`status` |optional, default to `NEW`| |
| 5040 | The status of the change (only `NEW` and `DRAFT` accepted here). |
David Ostrovsky | 9d8ec42 | 2014-12-24 00:52:09 +0100 | [diff] [blame] | 5041 | |`base_change` |optional| |
| 5042 | A link:#change-id[\{change-id\}] that identifies the base change for a create |
Yuxuan 'fishy' Wang | af6807f | 2016-02-10 15:11:57 -0800 | [diff] [blame] | 5043 | change operation. |
| 5044 | |`new_branch` |optional, default to `false`| |
| 5045 | Allow creating a new branch when set to `true`. |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 5046 | |`merge` |optional| |
| 5047 | The detail of a merge commit as a link:#merge-input[MergeInput] entity. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5048 | |================================== |
| 5049 | |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 5050 | [[change-message-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5051 | === ChangeMessageInfo |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 5052 | The `ChangeMessageInfo` entity contains information about a message |
| 5053 | attached to a change. |
| 5054 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5055 | [options="header",cols="1,^1,5"] |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 5056 | |================================== |
| 5057 | |Field Name ||Description |
| 5058 | |`id` ||The ID of the message. |
| 5059 | |`author` |optional| |
Khai Do | 23845a1 | 2014-06-02 11:28:16 -0700 | [diff] [blame] | 5060 | Author of the message as an |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 5061 | link:rest-api-accounts.html#account-info[AccountInfo] entity. + |
| 5062 | Unset if written by the Gerrit system. |
| 5063 | |`date` || |
| 5064 | The link:rest-api.html#timestamp[timestamp] this message was posted. |
| 5065 | |`message` ||The text left by the user. |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 5066 | |`tag` |optional| |
| 5067 | Value of the `tag` field from link:#review-input[ReviewInput] set |
| 5068 | while posting the review. |
| 5069 | NOTE: To apply different tags on on different votes/comments multiple |
| 5070 | invocations of the REST call are required. |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 5071 | |`_revision_number` |optional| |
| 5072 | Which patchset (if any) generated this message. |
| 5073 | |================================== |
| 5074 | |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 5075 | [[cherrypick-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5076 | === CherryPickInput |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 5077 | The `CherryPickInput` entity contains information for cherry-picking a change to a new branch. |
| 5078 | |
Alice Kober-Sotzek | f271c25 | 2016-10-12 13:13:54 +0200 | [diff] [blame] | 5079 | [options="header",cols="1,^1,5"] |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 5080 | |=========================== |
Alice Kober-Sotzek | f271c25 | 2016-10-12 13:13:54 +0200 | [diff] [blame] | 5081 | |Field Name ||Description |
| 5082 | |`message` ||Commit message for the cherry-picked change |
| 5083 | |`destination` ||Destination branch |
| 5084 | |`parent` |optional, defaults to 1| |
| 5085 | Number of the parent relative to which the cherry-pick should be considered. |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 5086 | |=========================== |
| 5087 | |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 5088 | [[comment-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5089 | === CommentInfo |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 5090 | The `CommentInfo` entity contains information about an inline comment. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 5091 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5092 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 5093 | |=========================== |
| 5094 | |Field Name ||Description |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 5095 | |`patch_set` |optional| |
| 5096 | The patch set number for the comment; only set in contexts where + |
| 5097 | comments may be returned for multiple patch sets. |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5098 | |`id` ||The URL encoded UUID of the comment. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 5099 | |`path` |optional| |
| 5100 | The path of the file for which the inline comment was done. + |
| 5101 | Not set if returned in a map where the key is the file path. |
| 5102 | |`side` |optional| |
| 5103 | The side on which the comment was added. + |
| 5104 | Allowed values are `REVISION` and `PARENT`. + |
| 5105 | If not set, the default is `REVISION`. |
Dawid Grzegorczyk | 5904524 | 2015-11-07 11:26:02 +0100 | [diff] [blame] | 5106 | |`parent` |optional| |
| 5107 | The 1-based parent number. Used only for merge commits when `side == PARENT`. |
| 5108 | When not set the comment is for the auto-merge tree. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 5109 | |`line` |optional| |
| 5110 | The number of the line for which the comment was done. + |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5111 | If range is set, this equals the end line of the range. + |
| 5112 | If neither line nor range is set, it's a file comment. |
| 5113 | |`range` |optional| |
David Pursehouse | 8d869ea | 2014-08-26 14:09:53 +0900 | [diff] [blame] | 5114 | The range of the comment as a link:#comment-range[CommentRange] |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5115 | entity. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 5116 | |`in_reply_to` |optional| |
| 5117 | The URL encoded UUID of the comment to which this comment is a reply. |
| 5118 | |`message` |optional|The comment message. |
| 5119 | |`updated` || |
| 5120 | The link:rest-api.html#timestamp[timestamp] of when this comment was |
| 5121 | written. |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5122 | |`author` |optional| |
David Pursehouse | c633a57 | 2013-08-26 14:01:59 +0900 | [diff] [blame] | 5123 | The author of the message as an |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5124 | link:rest-api-accounts.html#account-info[AccountInfo] entity. + |
| 5125 | Unset for draft comments, assumed to be the calling user. |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 5126 | |`tag` |optional| |
| 5127 | Value of the `tag` field from link:#review-input[ReviewInput] set |
| 5128 | while posting the review. |
| 5129 | NOTE: To apply different tags on on different votes/comments multiple |
| 5130 | invocations of the REST call are required. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 5131 | |=========================== |
| 5132 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5133 | [[comment-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5134 | === CommentInput |
Orgad Shaneh | c99da3a | 2014-06-13 14:57:54 +0300 | [diff] [blame] | 5135 | The `CommentInput` entity contains information for creating an inline |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5136 | comment. |
| 5137 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5138 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5139 | |=========================== |
| 5140 | |Field Name ||Description |
| 5141 | |`id` |optional| |
Edwin Kempin | c09826d7 | 2013-02-26 16:10:39 +0100 | [diff] [blame] | 5142 | The URL encoded UUID of the comment if an existing draft comment should |
| 5143 | be updated. |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5144 | |`path` |optional| |
| 5145 | The path of the file for which the inline comment should be added. + |
| 5146 | Doesn't need to be set if contained in a map where the key is the file |
| 5147 | path. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5148 | |`side` |optional| |
| 5149 | The side on which the comment should be added. + |
| 5150 | Allowed values are `REVISION` and `PARENT`. + |
| 5151 | If not set, the default is `REVISION`. |
| 5152 | |`line` |optional| |
| 5153 | The number of the line for which the comment should be added. + |
| 5154 | `0` if it is a file comment. + |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5155 | If neither line nor range is set, a file comment is added. + |
David Pursehouse | 4a159a1 | 2014-08-26 15:45:14 +0900 | [diff] [blame] | 5156 | If range is set, this value is ignored in favor of the `end_line` of the range. |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5157 | |`range` |optional| |
David Pursehouse | 8d869ea | 2014-08-26 14:09:53 +0900 | [diff] [blame] | 5158 | The range of the comment as a link:#comment-range[CommentRange] |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5159 | entity. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5160 | |`in_reply_to` |optional| |
| 5161 | The URL encoded UUID of the comment to which this comment is a reply. |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5162 | |`updated` |optional| |
| 5163 | The link:rest-api.html#timestamp[timestamp] of this comment. + |
| 5164 | Accepted but ignored. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5165 | |`message` |optional| |
| 5166 | The comment message. + |
| 5167 | If not set and an existing draft comment is updated, the existing draft |
| 5168 | comment is deleted. |
Dave Borowitz | 3dd203b | 2016-04-19 13:52:41 -0400 | [diff] [blame] | 5169 | |`tag` |optional, drafts only| |
| 5170 | Value of the `tag` field. Only allowed on link:#create-draft[draft comment] + |
| 5171 | inputs; for published comments, use the `tag` field in + |
| 5172 | link#review-input[ReviewInput] |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5173 | |=========================== |
| 5174 | |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5175 | [[comment-range]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5176 | === CommentRange |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5177 | The `CommentRange` entity describes the range of an inline comment. |
| 5178 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5179 | [options="header",cols="1,^1,5"] |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 5180 | |=========================== |
| 5181 | |Field Name ||Description |
| 5182 | |`start_line` ||The start line number of the range. |
| 5183 | |`start_character` ||The character position in the start line. |
| 5184 | |`end_line` ||The end line number of the range. |
| 5185 | |`end_character` ||The character position in the end line. |
| 5186 | |=========================== |
| 5187 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5188 | [[commit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5189 | === CommitInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5190 | The `CommitInfo` entity contains information about a commit. |
| 5191 | |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 5192 | [options="header",cols="1,^1,5"] |
| 5193 | |=========================== |
| 5194 | |Field Name ||Description |
Edwin Kempin | c823740 | 2015-07-15 18:27:55 +0200 | [diff] [blame] | 5195 | |`commit` |Optional| |
| 5196 | The commit ID. Not set if included in a link:#revision-info[ |
| 5197 | RevisionInfo] entity that is contained in a map which has the commit ID |
| 5198 | as key. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 5199 | |`parents` || |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5200 | The parent commits of this commit as a list of |
Edwin Kempin | cecf90a | 2014-04-09 14:58:35 +0200 | [diff] [blame] | 5201 | link:#commit-info[CommitInfo] entities. In each parent |
| 5202 | only the `commit` and `subject` fields are populated. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 5203 | |`author` ||The author of the commit as a |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5204 | link:#git-person-info[GitPersonInfo] entity. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 5205 | |`committer` ||The committer of the commit as a |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5206 | link:#git-person-info[GitPersonInfo] entity. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 5207 | |`subject` || |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5208 | The subject of the commit (header line of the commit message). |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 5209 | |`message` ||The commit message. |
Sven Selberg | d26bd54 | 2014-11-21 16:28:10 +0100 | [diff] [blame] | 5210 | |`web_links` |optional| |
| 5211 | Links to the commit in external sites as a list of |
| 5212 | link:#web-link-info[WebLinkInfo] entities. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 5213 | |=========================== |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5214 | |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 5215 | [[delete-reviewer-input]] |
| 5216 | === DeleteReviewerInput |
| 5217 | The `DeleteReviewerInput` entity contains options for the deletion of a |
| 5218 | reviewer. |
| 5219 | |
| 5220 | [options="header",cols="1,^1,5"] |
| 5221 | |======================= |
| 5222 | |Field Name||Description |
| 5223 | |`notify` |optional| |
| 5224 | Notify handling that defines to whom email notifications should be sent |
| 5225 | after the reviewer is deleted. + |
| 5226 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 5227 | If not set, the default is `ALL`. |
| 5228 | |======================= |
| 5229 | |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 5230 | [[delete-vote-input]] |
| 5231 | === DeleteVoteInput |
| 5232 | The `DeleteVoteInput` entity contains options for the deletion of a |
| 5233 | vote. |
| 5234 | |
| 5235 | [options="header",cols="1,^1,5"] |
| 5236 | |======================= |
| 5237 | |Field Name||Description |
| 5238 | |`label` |optional| |
| 5239 | The label for which the vote should be deleted. + |
| 5240 | If set, must match the label in the URL. |
| 5241 | |`notify` |optional| |
| 5242 | Notify handling that defines to whom email notifications should be sent |
| 5243 | after the vote is deleted. + |
| 5244 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 5245 | If not set, the default is `ALL`. |
| 5246 | |======================= |
| 5247 | |
Kasper Nilsson | 9f2ed6a | 2016-11-15 11:12:37 -0800 | [diff] [blame] | 5248 | [[description-input]] |
| 5249 | === DescriptionInput |
| 5250 | The `DescriptionInput` entity contains information for setting a description. |
| 5251 | |
| 5252 | [options="header",cols="1,6"] |
| 5253 | |=========================== |
| 5254 | |Field Name |Description |
| 5255 | |`description` |The description text. |
| 5256 | |=========================== |
| 5257 | |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5258 | [[diff-content]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5259 | === DiffContent |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5260 | The `DiffContent` entity contains information about the content differences |
| 5261 | in a file. |
| 5262 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5263 | [options="header",cols="1,^1,5"] |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5264 | |========================== |
| 5265 | |Field Name ||Description |
| 5266 | |`a` |optional|Content only in the file on side A (deleted in B). |
| 5267 | |`b` |optional|Content only in the file on side B (added in B). |
| 5268 | |`ab` |optional|Content in the file on both sides (unchanged). |
| 5269 | |`edit_a` |only present during a replace, i.e. both `a` and `b` are present| |
| 5270 | Text sections deleted from side A as a |
| 5271 | link:#diff-intraline-info[DiffIntralineInfo] entity. |
| 5272 | |`edit_b` |only present during a replace, i.e. both `a` and `b` are present| |
| 5273 | Text sections inserted in side B as a |
| 5274 | link:#diff-intraline-info[DiffIntralineInfo] entity. |
| 5275 | |`skip` |optional|count of lines skipped on both sides when the file is |
| 5276 | too large to include all common lines. |
Shawn Pearce | 425a2be | 2014-01-02 16:00:58 -0800 | [diff] [blame] | 5277 | |`common` |optional|Set to `true` if the region is common according |
| 5278 | to the requested ignore-whitespace parameter, but a and b contain |
| 5279 | differing amounts of whitespace. When present and true a and b are |
| 5280 | used instead of ab. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5281 | |========================== |
| 5282 | |
| 5283 | [[diff-file-meta-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5284 | === DiffFileMetaInfo |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5285 | The `DiffFileMetaInfo` entity contains meta information about a file diff. |
| 5286 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5287 | [options="header",cols="1,^1,5"] |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5288 | |========================== |
Sven Selberg | e7f3f0a | 2014-10-21 11:04:42 +0200 | [diff] [blame] | 5289 | |Field Name ||Description |
| 5290 | |`name` ||The name of the file. |
| 5291 | |`content_type`||The content type of the file. |
| 5292 | |`lines` ||The total number of lines in the file. |
Edwin Kempin | 26c95a4 | 2014-11-25 16:29:47 +0100 | [diff] [blame] | 5293 | |`web_links` |optional| |
Sven Selberg | e7f3f0a | 2014-10-21 11:04:42 +0200 | [diff] [blame] | 5294 | Links to the file in external sites as a list of |
Shawn Pearce | b62414c | 2014-10-16 22:48:33 -0700 | [diff] [blame] | 5295 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5296 | |========================== |
| 5297 | |
| 5298 | [[diff-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5299 | === DiffInfo |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5300 | The `DiffInfo` entity contains information about the diff of a file |
| 5301 | in a revision. |
| 5302 | |
Edwin Kempin | 8cdce50 | 2014-12-06 10:55:38 +0100 | [diff] [blame] | 5303 | If the link:#weblinks-only[weblinks-only] parameter is specified, only |
| 5304 | the `web_links` field is set. |
| 5305 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5306 | [options="header",cols="1,^1,5"] |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5307 | |========================== |
| 5308 | |Field Name ||Description |
| 5309 | |`meta_a` |not present when the file is added| |
| 5310 | Meta information about the file on side A as a |
| 5311 | link:#diff-file-meta-info[DiffFileMetaInfo] entity. |
| 5312 | |`meta_b` |not present when the file is deleted| |
| 5313 | Meta information about the file on side B as a |
| 5314 | link:#diff-file-meta-info[DiffFileMetaInfo] entity. |
| 5315 | |`change_type` ||The type of change (`ADDED`, `MODIFIED`, `DELETED`, `RENAMED` |
| 5316 | `COPIED`, `REWRITE`). |
| 5317 | |`intraline_status`|only set when the `intraline` parameter was specified in the request| |
| 5318 | Intraline status (`OK`, `ERROR`, `TIMEOUT`). |
| 5319 | |`diff_header` ||A list of strings representing the patch set diff header. |
| 5320 | |`content` ||The content differences in the file as a list of |
| 5321 | link:#diff-content[DiffContent] entities. |
Edwin Kempin | 8cdce50 | 2014-12-06 10:55:38 +0100 | [diff] [blame] | 5322 | |`web_links` |optional| |
| 5323 | Links to the file diff in external sites as a list of |
| 5324 | link:rest-api-changes.html#diff-web-link-info[DiffWebLinkInfo] entries. |
David Ostrovsky | cdbef23 | 2015-02-13 01:16:37 +0100 | [diff] [blame] | 5325 | |`binary` |not set if `false`|Whether the file is binary. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5326 | |========================== |
| 5327 | |
| 5328 | [[diff-intraline-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5329 | === DiffIntralineInfo |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5330 | The `DiffIntralineInfo` entity contains information about intraline edits in a |
| 5331 | file. |
| 5332 | |
David Pursehouse | 31203f5 | 2013-06-08 17:05:45 +0900 | [diff] [blame] | 5333 | The information consists of a list of `<skip length, mark length>` pairs, where |
| 5334 | the skip length is the number of characters between the end of the previous edit |
| 5335 | and the start of this edit, and the mark length is the number of edited characters |
| 5336 | following the skip. The start of the edits is from the beginning of the related |
| 5337 | diff content lines. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5338 | |
David Pursehouse | 31203f5 | 2013-06-08 17:05:45 +0900 | [diff] [blame] | 5339 | Note that the implied newline character at the end of each line is included in |
Colby Ranger | 4c29275 | 2013-06-07 11:11:00 -0700 | [diff] [blame] | 5340 | the length calculation, and thus it is possible for the edits to span newlines. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5341 | |
Edwin Kempin | 8cdce50 | 2014-12-06 10:55:38 +0100 | [diff] [blame] | 5342 | [[diff-web-link-info]] |
| 5343 | === DiffWebLinkInfo |
| 5344 | The `DiffWebLinkInfo` entity describes a link on a diff screen to an |
| 5345 | external site. |
| 5346 | |
| 5347 | [options="header",cols="1,6"] |
| 5348 | |======================= |
| 5349 | |Field Name|Description |
| 5350 | |`name` |The link name. |
| 5351 | |`url` |The link URL. |
| 5352 | |`image_url`|URL to the icon of the link. |
| 5353 | |show_on_side_by_side_diff_view| |
| 5354 | Whether the web link should be shown on the side-by-side diff screen. |
| 5355 | |show_on_unified_diff_view| |
| 5356 | Whether the web link should be shown on the unified diff screen. |
| 5357 | |======================= |
| 5358 | |
David Ostrovsky | 9ea9c11 | 2015-01-25 00:12:38 +0100 | [diff] [blame] | 5359 | [[edit-file-info]] |
| 5360 | === EditFileInfo |
| 5361 | The `EditFileInfo` entity contains additional information |
| 5362 | of a file within a change edit. |
| 5363 | |
| 5364 | [options="header",cols="1,^1,5"] |
| 5365 | |=========================== |
| 5366 | |Field Name ||Description |
| 5367 | |`web_links` |optional| |
| 5368 | Links to the diff info in external sites as a list of |
| 5369 | link:#web-link-info[WebLinkInfo] entities. |
| 5370 | |=========================== |
| 5371 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5372 | [[edit-info]] |
| 5373 | === EditInfo |
| 5374 | The `EditInfo` entity contains information about a change edit. |
| 5375 | |
| 5376 | [options="header",cols="1,^1,5"] |
| 5377 | |=========================== |
Michael Zhou | d03fe28 | 2016-04-25 17:13:17 -0400 | [diff] [blame] | 5378 | |Field Name ||Description |
| 5379 | |`commit` ||The commit of change edit as |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5380 | link:#commit-info[CommitInfo] entity. |
Michael Zhou | d03fe28 | 2016-04-25 17:13:17 -0400 | [diff] [blame] | 5381 | |`base_revision`||The revision of the patch set the change edit is based on. |
| 5382 | |`fetch` || |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5383 | Information about how to fetch this patch set. The fetch information is |
| 5384 | provided as a map that maps the protocol name ("`git`", "`http`", |
| 5385 | "`ssh`") to link:#fetch-info[FetchInfo] entities. |
Michael Zhou | d03fe28 | 2016-04-25 17:13:17 -0400 | [diff] [blame] | 5386 | |`files` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5387 | The files of the change edit as a map that maps the file names to |
| 5388 | link:#file-info[FileInfo] entities. |
| 5389 | |=========================== |
| 5390 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5391 | [[fetch-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5392 | === FetchInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5393 | The `FetchInfo` entity contains information about how to fetch a patch |
| 5394 | set via a certain protocol. |
| 5395 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5396 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5397 | |========================== |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 5398 | |Field Name ||Description |
| 5399 | |`url` ||The URL of the project. |
| 5400 | |`ref` ||The ref of the patch set. |
| 5401 | |`commands` |optional| |
| 5402 | The download commands for this patch set as a map that maps the command |
| 5403 | names to the commands. + |
David Pursehouse | 025c1af | 2015-11-20 17:02:50 +0900 | [diff] [blame] | 5404 | Only set if link:#download-commands[download commands] are requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5405 | |========================== |
| 5406 | |
| 5407 | [[file-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5408 | === FileInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5409 | The `FileInfo` entity contains information about a file in a patch set. |
| 5410 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5411 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5412 | |============================= |
| 5413 | |Field Name ||Description |
| 5414 | |`status` |optional| |
| 5415 | The status of the file ("`A`"=Added, "`D`"=Deleted, "`R`"=Renamed, |
| 5416 | "`C`"=Copied, "`W`"=Rewritten). + |
| 5417 | Not set if the file was Modified ("`M`"). |
| 5418 | |`binary` |not set if `false`|Whether the file is binary. |
| 5419 | |`old_path` |optional| |
| 5420 | The old file path. + |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 5421 | Only set if the file was renamed or copied. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5422 | |`lines_inserted`|optional| |
| 5423 | Number of inserted lines. + |
| 5424 | Not set for binary files or if no lines were inserted. |
| 5425 | |`lines_deleted` |optional| |
| 5426 | Number of deleted lines. + |
| 5427 | Not set for binary files or if no lines were deleted. |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 5428 | |`size_delta` || |
| 5429 | Number of bytes by which the file size increased/decreased. |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 5430 | |`size` || |
| 5431 | File size in bytes. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5432 | |============================= |
| 5433 | |
Dave Borowitz | bad53ee | 2015-06-11 10:10:18 -0400 | [diff] [blame] | 5434 | [[fix-input]] |
| 5435 | === FixInput |
| 5436 | The `FixInput` entity contains options for fixing commits using the |
| 5437 | link:#fix-change[fix change] endpoint. |
| 5438 | |
| 5439 | [options="header",cols="1,6"] |
| 5440 | |========================== |
Dave Borowitz | b50a7ed | 2015-07-27 15:10:36 -0700 | [diff] [blame] | 5441 | |Field Name |Description |
| 5442 | |`delete_patch_set_if_commit_missing`|If true, delete patch sets from the |
Dave Borowitz | bad53ee | 2015-06-11 10:10:18 -0400 | [diff] [blame] | 5443 | database if they refer to missing commit options. |
Dave Borowitz | b50a7ed | 2015-07-27 15:10:36 -0700 | [diff] [blame] | 5444 | |`expect_merged_as` |If set, check that the change is |
Dave Borowitz | a828fed | 2015-05-05 14:43:40 -0700 | [diff] [blame] | 5445 | merged into the destination branch as this exact SHA-1. If not, insert |
| 5446 | a new patch set referring to this commit. |
Dave Borowitz | bad53ee | 2015-06-11 10:10:18 -0400 | [diff] [blame] | 5447 | |========================== |
| 5448 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5449 | [[git-person-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5450 | === GitPersonInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5451 | The `GitPersonInfo` entity contains information about the |
| 5452 | author/committer of a commit. |
| 5453 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5454 | [options="header",cols="1,6"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5455 | |========================== |
| 5456 | |Field Name |Description |
| 5457 | |`name` |The name of the author/committer. |
| 5458 | |`email` |The email address of the author/committer. |
| 5459 | |`date` |The link:rest-api.html#timestamp[timestamp] of when |
| 5460 | this identity was constructed. |
| 5461 | |`tz` |The timezone offset from UTC of when this identity was |
| 5462 | constructed. |
| 5463 | |========================== |
| 5464 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5465 | [[group-base-info]] |
| 5466 | === GroupBaseInfo |
| 5467 | The `GroupBaseInfo` entity contains base information about the group. |
| 5468 | |
| 5469 | [options="header",cols="1,6"] |
| 5470 | |========================== |
| 5471 | |Field Name |Description |
Edwin Kempin | 703613c | 2016-11-25 16:06:04 +0100 | [diff] [blame] | 5472 | |`id` |The UUID of the group. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5473 | |`name` |The name of the group. |
| 5474 | |========================== |
| 5475 | |
David Pursehouse | d9dac37 | 2016-11-24 19:41:10 +0900 | [diff] [blame] | 5476 | [[hashtags-input]] |
| 5477 | === HashtagsInput |
| 5478 | |
| 5479 | The `HashtagsInput` entity contains information about hashtags to add to, |
| 5480 | and/or remove from, a change. |
| 5481 | |
| 5482 | [options="header",cols="1,^1,5"] |
| 5483 | |======================= |
| 5484 | |Field Name||Description |
| 5485 | |`add` |optional|The list of hashtags to be added to the change. |
| 5486 | |`remove |optional|The list of hashtags to be removed from the change. |
| 5487 | |======================= |
| 5488 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5489 | [[included-in-info]] |
| 5490 | === IncludedInInfo |
| 5491 | The `IncludedInInfo` entity contains information about the branches a |
| 5492 | change was merged into and tags it was tagged with. |
| 5493 | |
Edwin Kempin | 78279ba | 2015-05-22 15:22:41 +0200 | [diff] [blame] | 5494 | [options="header",cols="1,^1,5"] |
| 5495 | |======================= |
| 5496 | |Field Name||Description |
| 5497 | |`branches`||The list of branches this change was merged into. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5498 | Each branch is listed without the 'refs/head/' prefix. |
Edwin Kempin | 78279ba | 2015-05-22 15:22:41 +0200 | [diff] [blame] | 5499 | |`tags` ||The list of tags this change was tagged with. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5500 | Each tag is listed without the 'refs/tags/' prefix. |
Edwin Kempin | 78279ba | 2015-05-22 15:22:41 +0200 | [diff] [blame] | 5501 | |`external`|optional|A map that maps a name to a list of external |
| 5502 | systems that include this change, e.g. a list of servers on which this |
| 5503 | change is deployed. |
| 5504 | |======================= |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5505 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5506 | [[label-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5507 | === LabelInfo |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5508 | The `LabelInfo` entity contains information about a label on a change, always |
| 5509 | corresponding to the current patch set. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5510 | |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5511 | There are two options that control the contents of `LabelInfo`: |
Dave Borowitz | 7d6aa01 | 2013-06-14 16:53:48 -0700 | [diff] [blame] | 5512 | link:#labels[`LABELS`] and link:#detailed-labels[`DETAILED_LABELS`]. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5513 | |
| 5514 | * For a quick summary of the state of labels, use `LABELS`. |
| 5515 | * For detailed information about labels, including exact numeric votes for all |
| 5516 | users and the allowed range of votes for the current user, use `DETAILED_LABELS`. |
| 5517 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5518 | ==== Common fields |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5519 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5520 | |=========================== |
| 5521 | |Field Name ||Description |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5522 | |`optional` |not set if `false`| |
| 5523 | Whether the label is optional. Optional means the label may be set, but |
| 5524 | it's neither necessary for submission nor does it block submission if |
| 5525 | set. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5526 | |=========================== |
| 5527 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5528 | ==== Fields set by `LABELS` |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5529 | [options="header",cols="1,^1,5"] |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5530 | |=========================== |
| 5531 | |Field Name ||Description |
| 5532 | |`approved` |optional|One user who approved this label on the change |
| 5533 | (voted the maximum value) as an |
| 5534 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 5535 | |`rejected` |optional|One user who rejected this label on the change |
| 5536 | (voted the minimum value) as an |
| 5537 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 5538 | |`recommended` |optional|One user who recommended this label on the |
| 5539 | change (voted positively, but not the maximum value) as an |
| 5540 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 5541 | |`disliked` |optional|One user who disliked this label on the change |
| 5542 | (voted negatively, but not the minimum value) as an |
| 5543 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
David Ostrovsky | 5292fd7 | 2014-02-27 21:56:35 +0100 | [diff] [blame] | 5544 | |`blocking` |optional|If `true`, the label blocks submit operation. |
| 5545 | If not set, the default is false. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5546 | |`value` |optional|The voting value of the user who |
| 5547 | recommended/disliked this label on the change if it is not |
| 5548 | "`+1`"/"`-1`". |
Khai Do | 4c91b00 | 2014-04-06 23:27:43 -0700 | [diff] [blame] | 5549 | |`default_value`|optional|The default voting value for the label. |
| 5550 | This value may be outside the range specified in permitted_labels. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5551 | |=========================== |
| 5552 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5553 | ==== Fields set by `DETAILED_LABELS` |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5554 | [options="header",cols="1,^1,5"] |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5555 | |=========================== |
| 5556 | |Field Name ||Description |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5557 | |`all` |optional|List of all approvals for this label as a list |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5558 | of link:#approval-info[ApprovalInfo] entities. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5559 | |`values` |optional|A map of all values that are allowed for this |
| 5560 | label. The map maps the values ("`-2`", "`-1`", " `0`", "`+1`", "`+2`") |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5561 | to the value descriptions. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5562 | |=========================== |
| 5563 | |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 5564 | [[mergeable-info]] |
| 5565 | === MergeableInfo |
| 5566 | The `MergeableInfo` entity contains information about the mergeability of a |
| 5567 | change. |
| 5568 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5569 | [options="header",cols="1,^1,5"] |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 5570 | |============================ |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 5571 | |Field Name ||Description |
| 5572 | |`submit_type` || |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 5573 | Submit type used for this change, can be `MERGE_IF_NECESSARY`, |
| 5574 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or |
| 5575 | `CHERRY_PICK`. |
Zhen Chen | ec13e45 | 2016-08-03 23:29:43 -0700 | [diff] [blame] | 5576 | |`strategy` |optional| |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 5577 | The strategy of the merge, can be `recursive`, `resolve`, |
| 5578 | `simple-two-way-in-core`, `ours` or `theirs`. |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 5579 | |`mergeable` || |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 5580 | `true` if this change is cleanly mergeable, `false` otherwise |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 5581 | |`commit_merged` |optional| |
| 5582 | `true` if this change is already merged, `false` otherwise |
| 5583 | |`content_merged` |optional| |
| 5584 | `true` if the content of this change is already merged, `false` otherwise |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 5585 | |`conflicts`|optional| |
| 5586 | A list of paths with conflicts |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 5587 | |`mergeable_into`|optional| |
| 5588 | A list of other branch names where this change could merge cleanly |
Saša Živkov | 76bab29 | 2014-05-08 14:29:12 +0200 | [diff] [blame] | 5589 | |============================ |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 5590 | |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 5591 | [[merge-input]] |
| 5592 | === MergeInput |
| 5593 | The `MergeInput` entity contains information about the merge |
| 5594 | |
| 5595 | [options="header",cols="1,^1,5"] |
| 5596 | |============================ |
| 5597 | |Field Name ||Description |
| 5598 | |`source` || |
| 5599 | The source to merge from, e.g. a complete or abbreviated commit SHA-1, |
| 5600 | a complete reference name, a short reference name under refs/heads, refs/tags, |
| 5601 | or refs/remotes namespace, etc. |
| 5602 | |`strategy` |optional| |
| 5603 | The strategy of the merge, can be `recursive`, `resolve`, |
| 5604 | `simple-two-way-in-core`, `ours` or `theirs`, default will use project settings. |
| 5605 | |============================ |
| 5606 | |
Zhen Chen | b1e07e5 | 2016-09-23 12:59:48 -0700 | [diff] [blame] | 5607 | [[merge-patch-set-input]] |
| 5608 | === MergePatchSetInput |
| 5609 | The `MergePatchSetInput` entity contains information about updating a new |
| 5610 | change by creating a new merge commit. |
| 5611 | |
| 5612 | [options="header",cols="1,^1,5"] |
| 5613 | |================================== |
| 5614 | |Field Name ||Description |
| 5615 | |`subject` |optional| |
| 5616 | The new subject for the change, if not specified, will reuse the current patch |
| 5617 | set's subject |
| 5618 | |`inheritParent` |optional, default to `false`| |
| 5619 | Use the current patch set's first parent as the merge tip when set to `true`. |
| 5620 | Otherwise, use the current branch tip of the destination branch. |
| 5621 | |`merge` || |
| 5622 | The detail of the source commit for merge as a link:#merge-input[MergeInput] |
| 5623 | entity. |
| 5624 | |================================== |
| 5625 | |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 5626 | [[move-input]] |
| 5627 | === MoveInput |
| 5628 | The `MoveInput` entity contains information for moving a change to a new branch. |
| 5629 | |
| 5630 | [options="header",cols="1,^1,5"] |
| 5631 | |=========================== |
Michael Zhou | d03fe28 | 2016-04-25 17:13:17 -0400 | [diff] [blame] | 5632 | |Field Name ||Description |
| 5633 | |`destination_branch`||Destination branch |
| 5634 | |`message` |optional| |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 5635 | A message to be posted in this change's comments |
| 5636 | |=========================== |
| 5637 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5638 | [[problem-info]] |
| 5639 | === ProblemInfo |
| 5640 | The `ProblemInfo` entity contains a description of a potential consistency problem |
| 5641 | with a change. These are not related to the code review process, but rather |
| 5642 | indicate some inconsistency in Gerrit's database or repository metadata related |
| 5643 | to the enclosing change. |
| 5644 | |
| 5645 | [options="header",cols="1,^1,5"] |
| 5646 | |=========================== |
| 5647 | |Field Name||Description |
| 5648 | |`message` ||Plaintext message describing the problem with the change. |
| 5649 | |`status` |optional| |
| 5650 | The status of fixing the problem (`FIXED`, `FIX_FAILED`). Only set if a |
| 5651 | fix was attempted. |
| 5652 | |`outcome` |optional| |
| 5653 | If `status` is set, an additional plaintext message describing the |
| 5654 | outcome of the fix. |
| 5655 | |=========================== |
| 5656 | |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 5657 | [[publish-change-edit-input]] |
| 5658 | === PublishChangeEditInput |
| 5659 | The `PublishChangeEditInput` entity contains options for the publishing of |
| 5660 | change edit. |
| 5661 | |
| 5662 | [options="header",cols="1,^1,5"] |
| 5663 | |======================= |
| 5664 | |Field Name||Description |
| 5665 | |`notify` |optional| |
| 5666 | Notify handling that defines to whom email notifications should be sent |
| 5667 | after the change edit is published. + |
| 5668 | Allowed values are `NONE` and `ALL`. + |
| 5669 | If not set, the default is `ALL`. |
| 5670 | |======================= |
| 5671 | |
Dave Borowitz | 6f58dbe | 2015-09-14 12:34:31 -0400 | [diff] [blame] | 5672 | [[push-certificate-info]] |
| 5673 | === PushCertificateInfo |
| 5674 | The `PushCertificateInfo` entity contains information about a push |
| 5675 | certificate provided when the user pushed for review with `git push |
| 5676 | --signed HEAD:refs/for/<branch>`. Only used when signed push is |
| 5677 | link:config-gerrit.html#receive.enableSignedPush[enabled] on the server. |
| 5678 | |
| 5679 | [options="header",cols="1,6"] |
| 5680 | |=========================== |
| 5681 | |Field Name|Description |
| 5682 | |`certificate`|Signed certificate payload and GPG signature block. |
| 5683 | |`key` | |
| 5684 | Information about the key that signed the push, along with any problems |
| 5685 | found while checking the signature or the key itself, as a |
| 5686 | link:rest-api-accounts.html#gpg-key-info[GpgKeyInfo] entity. |
| 5687 | |=========================== |
| 5688 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 5689 | [[range-info]] |
| 5690 | === RangeInfo |
| 5691 | The `RangeInfo` entity stores the coordinates of a range. |
| 5692 | |
| 5693 | [options="header",cols="1,6"] |
| 5694 | |=========================== |
| 5695 | |Field Name | Description |
| 5696 | |`start` | First index. |
| 5697 | |`end` | Last index. |
| 5698 | |=========================== |
| 5699 | |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 5700 | [[rebase-input]] |
| 5701 | === RebaseInput |
| 5702 | The `RebaseInput` entity contains information for changing parent when rebasing. |
| 5703 | |
| 5704 | [options="header",width="50%",cols="1,^1,5"] |
| 5705 | |=========================== |
| 5706 | |Field Name ||Description |
| 5707 | |`base` |optional| |
| 5708 | The new parent revision. This can be a ref or a SHA1 to a concrete patchset. + |
| 5709 | Alternatively, a change number can be specified, in which case the current |
| 5710 | patch set is inferred. + |
| 5711 | Empty string is used for rebasing directly on top of the target branch, |
| 5712 | which effectively breaks dependency towards a parent change. |
| 5713 | |=========================== |
| 5714 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5715 | [[related-change-and-commit-info]] |
| 5716 | === RelatedChangeAndCommitInfo |
| 5717 | |
| 5718 | The `RelatedChangeAndCommitInfo` entity contains information about |
| 5719 | a related change and commit. |
| 5720 | |
| 5721 | [options="header",cols="1,^1,5"] |
| 5722 | |=========================== |
| 5723 | |Field Name ||Description |
| 5724 | |`change_id` |optional|The Change-Id of the change. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5725 | |`commit` ||The commit as a |
| 5726 | link:#commit-info[CommitInfo] entity. |
| 5727 | |`_change_number` |optional|The change number. |
| 5728 | |`_revision_number` |optional|The revision number. |
| 5729 | |`_current_revision_number`|optional|The current revision number. |
Stefan Beller | 3e8bd6e | 2015-06-17 09:46:36 -0700 | [diff] [blame] | 5730 | |`status` |optional|The status of the change. The status of |
Stefan Beller | 0d3cab0 | 2015-07-10 13:32:57 -0700 | [diff] [blame] | 5731 | the change is one of (`NEW`, `MERGED`, `ABANDONED`, `DRAFT`). |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 5732 | |=========================== |
| 5733 | |
| 5734 | [[related-changes-info]] |
| 5735 | === RelatedChangesInfo |
| 5736 | The `RelatedChangesInfo` entity contains information about related |
| 5737 | changes. |
| 5738 | |
| 5739 | [options="header",cols="1,6"] |
| 5740 | |=========================== |
| 5741 | |Field Name |Description |
| 5742 | |`changes` |A list of |
| 5743 | link:#related-change-and-commit-info[RelatedChangeAndCommitInfo] entities |
| 5744 | describing the related changes. Sorted by git commit order, newest to |
| 5745 | oldest. Empty if there are no related changes. |
| 5746 | |=========================== |
| 5747 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 5748 | [[restore-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5749 | === RestoreInput |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 5750 | The `RestoreInput` entity contains information for restoring a change. |
| 5751 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5752 | [options="header",cols="1,^1,5"] |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 5753 | |=========================== |
| 5754 | |Field Name ||Description |
| 5755 | |`message` |optional| |
| 5756 | Message to be added as review comment to the change when restoring the |
| 5757 | change. |
| 5758 | |=========================== |
| 5759 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 5760 | [[revert-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5761 | === RevertInput |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 5762 | The `RevertInput` entity contains information for reverting a change. |
| 5763 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5764 | [options="header",cols="1,^1,5"] |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 5765 | |=========================== |
| 5766 | |Field Name ||Description |
| 5767 | |`message` |optional| |
| 5768 | Message to be added as review comment to the change when reverting the |
| 5769 | change. |
| 5770 | |=========================== |
| 5771 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5772 | [[review-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5773 | === ReviewInfo |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5774 | The `ReviewInfo` entity contains information about a review. |
| 5775 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5776 | [options="header",cols="1,6"] |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5777 | |=========================== |
| 5778 | |Field Name |Description |
| 5779 | |`labels` | |
| 5780 | The labels of the review as a map that maps the label names to the |
| 5781 | voting values. |
| 5782 | |=========================== |
| 5783 | |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 5784 | [[review-update-info]] |
| 5785 | === ReviewerUpdateInfo |
| 5786 | The `ReviewerUpdateInfo` entity contains information about updates to |
| 5787 | change's reviewers set. |
| 5788 | |
| 5789 | [options="header",cols="1,6"] |
| 5790 | |=========================== |
| 5791 | |Field Name |Description |
| 5792 | |`updated`| |
| 5793 | Timestamp of the update. |
| 5794 | |`updated_by`| |
| 5795 | The account which modified state of the reviewer in question as |
| 5796 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 5797 | |`reviewer`| |
| 5798 | The reviewer account added or removed from the change as an |
| 5799 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 5800 | |`state`| |
| 5801 | The reviewer state, one of `REVIEWER`, `CC` or `REMOVED`. |
| 5802 | |=========================== |
| 5803 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5804 | [[review-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5805 | === ReviewInput |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5806 | The `ReviewInput` entity contains information for adding a review to a |
| 5807 | revision. |
| 5808 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5809 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5810 | |============================ |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 5811 | |Field Name ||Description |
| 5812 | |`message` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5813 | The message to be added as review comment. |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 5814 | |`tag` |optional| |
| 5815 | Apply this tag to the review comment message, votes, and inline |
| 5816 | comments. Tags may be used by CI or other automated systems to |
| 5817 | distinguish them from human reviews. Comments with specific tag |
| 5818 | values can be filtered out in the web UI. |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 5819 | |`labels` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5820 | The votes that should be added to the revision as a map that maps the |
| 5821 | label names to the voting values. |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 5822 | |`comments` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5823 | The comments that should be added as a map that maps a file path to a |
| 5824 | list of link:#comment-input[CommentInput] entities. |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 5825 | |`robot_comments` |optional| |
| 5826 | The robot comments that should be added as a map that maps a file path |
| 5827 | to a list of link:#robot-comment-input[RobotCommentInput] entities. |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 5828 | |`strict_labels` |`true` if not set| |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 5829 | Whether all labels are required to be within the user's permitted ranges |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5830 | based on access controls. + |
| 5831 | If `true`, attempting to use a label not granted to the user will fail |
| 5832 | the entire modify operation early. + |
| 5833 | If `false`, the operation will execute anyway, but the proposed labels |
| 5834 | will be modified to be the "best" value allowed by the access controls. |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 5835 | |`drafts` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5836 | Draft handling that defines how draft comments are handled that are |
| 5837 | already in the database but that were not also described in this |
| 5838 | input. + |
David Ostrovsky | 8a1da03 | 2014-07-25 10:57:35 +0200 | [diff] [blame] | 5839 | Allowed values are `DELETE`, `PUBLISH`, `PUBLISH_ALL_REVISIONS` and |
| 5840 | `KEEP`. All values except `PUBLISH_ALL_REVISIONS` operate only on drafts |
| 5841 | for a single revision. + |
Dave Borowitz | c064054 | 2016-10-05 16:19:21 -0400 | [diff] [blame] | 5842 | Only `KEEP` is allowed when used in conjunction with `on_behalf_of`. + |
| 5843 | If not set, the default is `DELETE`, unless `on_behalf_of` is set, in |
| 5844 | which case the default is `KEEP` and any other value is disallowed. |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 5845 | |`notify` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5846 | Notify handling that defines to whom email notifications should be sent |
| 5847 | after the review is stored. + |
| 5848 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 5849 | If not set, the default is `ALL`. |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 5850 | |`omit_duplicate_comments`|optional| |
| 5851 | If `true`, comments with the same content at the same place will be omitted. |
| 5852 | |`on_behalf_of` |optional| |
Shawn Pearce | 9d78312 | 2013-06-11 18:18:03 -0700 | [diff] [blame] | 5853 | link:rest-api-accounts.html#account-id[\{account-id\}] the review |
| 5854 | should be posted on behalf of. To use this option the caller must |
| 5855 | have been granted `labelAs-NAME` permission for all keys of labels. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 5856 | |============================ |
| 5857 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 5858 | [[reviewer-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5859 | === ReviewerInfo |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 5860 | The `ReviewerInfo` entity contains information about a reviewer and its |
| 5861 | votes on a change. |
| 5862 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 5863 | `ReviewerInfo` has the same fields as |
| 5864 | link:rest-api-accounts.html#account-info[AccountInfo] and includes |
| 5865 | link:#detailed-accounts[detailed account information]. |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 5866 | In addition `ReviewerInfo` has the following fields: |
| 5867 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5868 | [options="header",cols="1,6"] |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 5869 | |========================== |
| 5870 | |Field Name |Description |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 5871 | |`approvals` | |
| 5872 | The approvals of the reviewer as a map that maps the label names to the |
David Pursehouse | 778fefc | 2014-09-01 14:32:52 +0900 | [diff] [blame] | 5873 | approval values ("`-2`", "`-1`", "`0`", "`+1`", "`+2`"). |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 5874 | |========================== |
| 5875 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 5876 | [[reviewer-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5877 | === ReviewerInput |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 5878 | The `ReviewerInput` entity contains information for adding a reviewer |
| 5879 | to a change. |
| 5880 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5881 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 5882 | |=========================== |
| 5883 | |Field Name ||Description |
| 5884 | |`reviewer` || |
| 5885 | The link:rest-api-accounts.html#account-id[ID] of one account that |
| 5886 | should be added as reviewer or the link:rest-api-groups.html#group-id[ |
| 5887 | ID] of one group for which all members should be added as reviewers. + |
| 5888 | If an ID identifies both an account and a group, only the account is |
| 5889 | added as reviewer to the change. |
Logan Hanks | ee0a418 | 2016-07-06 14:39:26 -0700 | [diff] [blame] | 5890 | |`state` |optional| |
| 5891 | Add reviewer in this state. Possible reviewer states are `REVIEWER` |
| 5892 | and `CC`. If not given, defaults to `REVIEWER`. |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 5893 | |`confirmed` |optional| |
| 5894 | Whether adding the reviewer is confirmed. + |
| 5895 | The Gerrit server may be configured to |
| 5896 | link:config-gerrit.html#addreviewer.maxWithoutConfirmation[require a |
| 5897 | confirmation] when adding a group as reviewer that has many members. |
Sven Selberg | 4d64f97 | 2016-09-26 16:15:02 +0200 | [diff] [blame] | 5898 | |`notify` |optional| |
| 5899 | Notify handling that defines to whom email notifications should be sent |
| 5900 | after the reviewer is added. + |
| 5901 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 5902 | If not set, the default is `ALL`. |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 5903 | |=========================== |
| 5904 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5905 | [[revision-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5906 | === RevisionInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5907 | The `RevisionInfo` entity contains information about a patch set. |
Khai Do | b3139b753 | 2014-09-19 15:13:04 -0700 | [diff] [blame] | 5908 | Not all fields are returned by default. Additional fields can |
| 5909 | be obtained by adding `o` parameters as described in |
| 5910 | link:#list-changes[Query Changes]. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5911 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5912 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5913 | |=========================== |
| 5914 | |Field Name ||Description |
| 5915 | |`draft` |not set if `false`|Whether the patch set is a draft. |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 5916 | |`kind` ||The change kind. Valid values are `REWORK`, `TRIVIAL_REBASE`, |
| 5917 | `MERGE_FIRST_PARENT_UPDATE`, `NO_CODE_CHANGE`, and `NO_CHANGE`. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5918 | |`_number` ||The patch set number. |
Edwin Kempin | 04cbd34 | 2015-02-19 16:31:22 +0100 | [diff] [blame] | 5919 | |`created` || |
| 5920 | The link:rest-api.html#timestamp[timestamp] of when the patch set was |
| 5921 | created. |
| 5922 | |`uploader` || |
| 5923 | The uploader of the patch set as an |
| 5924 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 5925 | |`ref` ||The Git reference for the patch set. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5926 | |`fetch` || |
| 5927 | Information about how to fetch this patch set. The fetch information is |
| 5928 | provided as a map that maps the protocol name ("`git`", "`http`", |
Khai Do | b3139b753 | 2014-09-19 15:13:04 -0700 | [diff] [blame] | 5929 | "`ssh`") to link:#fetch-info[FetchInfo] entities. This information is |
| 5930 | only included if a plugin implementing the |
| 5931 | link:intro-project-owner.html#download-commands[download commands] |
| 5932 | interface is installed. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 5933 | |`commit` |optional|The commit of the patch set as |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5934 | link:#commit-info[CommitInfo] entity. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 5935 | |`files` |optional| |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5936 | The files of the patch set as a map that maps the file names to |
Khai Do | b3139b753 | 2014-09-19 15:13:04 -0700 | [diff] [blame] | 5937 | link:#file-info[FileInfo] entities. Only set if |
| 5938 | link:#current-files[CURRENT_FILES] or link:#all-files[ALL_FILES] |
| 5939 | option is requested. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 5940 | |`actions` |optional| |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 5941 | Actions the caller might be able to perform on this revision. The |
| 5942 | information is a map of view name to link:#action-info[ActionInfo] |
| 5943 | entities. |
Khai Do | b3139b753 | 2014-09-19 15:13:04 -0700 | [diff] [blame] | 5944 | |`reviewed` |optional| |
| 5945 | Indicates whether the caller is authenticated and has commented on the |
| 5946 | current revision. Only set if link:#reviewed[REVIEWED] option is requested. |
Dave Borowitz | d5ebd9b | 2015-04-23 17:19:34 -0700 | [diff] [blame] | 5947 | |`messageWithFooter` |optional| |
| 5948 | If the link:#commit-footers[COMMIT_FOOTERS] option is requested and |
| 5949 | this is the current patch set, contains the full commit message with |
| 5950 | Gerrit-specific commit footers, as if this revision were submitted |
| 5951 | using the link:project-configuration.html#cherry_pick[Cherry Pick] |
| 5952 | submit type. |
Dave Borowitz | 6f58dbe | 2015-09-14 12:34:31 -0400 | [diff] [blame] | 5953 | |`push_certificate` |optional| |
| 5954 | If the link:#push-certificates[PUSH_CERTIFICATES] option is requested, |
| 5955 | contains the push certificate provided by the user when uploading this |
| 5956 | patch set as a link:#push-certificate-info[PushCertificateInfo] entity. |
| 5957 | This field is always set if the option is requested; if no push |
| 5958 | certificate was provided, it is set to an empty object. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 5959 | |=========================== |
| 5960 | |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 5961 | [[robot-comment-info]] |
| 5962 | === RobotCommentInfo |
| 5963 | The `RobotCommentInfo` entity contains information about a robot inline |
| 5964 | comment. |
| 5965 | |
| 5966 | `RobotCommentInfo` has the same fields as link:#[CommentInfo]. |
| 5967 | In addition `RobotCommentInfo` has the following fields: |
| 5968 | |
| 5969 | [options="header",cols="1,^1,5"] |
| 5970 | |=========================== |
| 5971 | |Field Name ||Description |
| 5972 | |`robot_id` ||The ID of the robot that generated this comment. |
| 5973 | |`robot_run_id` ||An ID of the run of the robot. |
| 5974 | |`url` |optional|URL to more information. |
Edwin Kempin | 6627074 | 2016-09-28 15:57:36 +0200 | [diff] [blame] | 5975 | |`properties` |optional| |
| 5976 | Robot specific properties as map that maps arbitrary keys to values. |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 5977 | |=========================== |
| 5978 | |
| 5979 | [[robot-comment-input]] |
| 5980 | === RobotCommentInput |
| 5981 | The `RobotCommentInput` entity contains information for creating an inline |
| 5982 | robot comment. |
| 5983 | |
| 5984 | `RobotCommentInput` has the same fields as link:#[RobotCommentInfo]. |
| 5985 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 5986 | [[rule-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5987 | === RuleInput |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 5988 | The `RuleInput` entity contains information to test a Prolog rule. |
| 5989 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 5990 | [options="header",cols="1,^1,5"] |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 5991 | |=========================== |
| 5992 | |Field Name ||Description |
| 5993 | |`rule`|| |
| 5994 | Prolog code to execute instead of the code in `refs/meta/config`. |
| 5995 | |`filters`|`RUN` if not set| |
| 5996 | When `RUN` filter rules in the parent projects are called to |
| 5997 | post-process the results of the project specific rule. This |
| 5998 | behavior matches how the rule will execute if installed. + |
| 5999 | If `SKIP` the parent filters are not called, allowing the test |
| 6000 | to return results from the input rule. |
| 6001 | |=========================== |
| 6002 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 6003 | [[submit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6004 | === SubmitInfo |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 6005 | The `SubmitInfo` entity contains information about the change status |
| 6006 | after submitting. |
| 6007 | |
Stefan Beller | e4785b4 | 2015-06-18 12:31:03 -0700 | [diff] [blame] | 6008 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 6009 | |========================== |
Stefan Beller | e4785b4 | 2015-06-18 12:31:03 -0700 | [diff] [blame] | 6010 | |Field Name ||Description |
| 6011 | |`status` || |
Stefan Beller | 0d3cab0 | 2015-07-10 13:32:57 -0700 | [diff] [blame] | 6012 | The status of the change after submitting is `MERGED`. |
David Ostrovsky | 868e341 | 2014-01-30 19:50:57 +0100 | [diff] [blame] | 6013 | |`on_behalf_of`|optional| |
| 6014 | The link:rest-api-accounts.html#account-id[\{account-id\}] of the user on |
| 6015 | whose behalf the action should be done. To use this option the caller must |
David Pursehouse | 22bd6f9 | 2014-02-20 21:11:01 +0900 | [diff] [blame] | 6016 | have been granted both `Submit` and `Submit (On Behalf Of)` permissions. |
| 6017 | The user named by `on_behalf_of` does not need to be granted the `Submit` |
| 6018 | permission. This feature is aimed for CI solutions: the CI account can be |
David Pursehouse | a61ee50 | 2016-09-06 16:27:09 +0900 | [diff] [blame] | 6019 | granted both permissions, so individual users don't need `Submit` permission |
| 6020 | themselves. Still the changes can be submitted on behalf of real users and |
David Pursehouse | 22bd6f9 | 2014-02-20 21:11:01 +0900 | [diff] [blame] | 6021 | not with the identity of the CI account. |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 6022 | |========================== |
| 6023 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 6024 | [[submit-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6025 | === SubmitInput |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 6026 | The `SubmitInput` entity contains information for submitting a change. |
| 6027 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6028 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 6029 | |=========================== |
| 6030 | |Field Name ||Description |
Dave Borowitz | c6d143d | 2016-02-24 12:32:23 -0500 | [diff] [blame] | 6031 | |`on_behalf_of`|optional| |
| 6032 | If set, submit the change on behalf of the given user. The value may take any |
| 6033 | format link:rest-api-accounts.html#account-id[accepted by the accounts REST |
| 6034 | API]. Using this option requires |
| 6035 | link:access-control.html#category_submit_on_behalf_of[Submit (On Behalf Of)] |
| 6036 | permission on the branch. |
Stephen Li | a5a5ef0 | 2016-03-31 16:55:53 -0700 | [diff] [blame] | 6037 | |`notify`|optional| |
| 6038 | Notify handling that defines to whom email notifications should be sent after |
| 6039 | the change is submitted. + |
| 6040 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 6041 | If not set, the default is `ALL`. |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 6042 | |=========================== |
| 6043 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6044 | [[submit-record]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6045 | === SubmitRecord |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6046 | The `SubmitRecord` entity describes results from a submit_rule. |
Dave Borowitz | 6453fce | 2016-09-22 16:11:56 +0200 | [diff] [blame] | 6047 | Fields in this entity roughly correspond to the fields set by `LABELS` |
| 6048 | in link:#label-info[LabelInfo]. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6049 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6050 | [options="header",cols="1,^1,5"] |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6051 | |=========================== |
| 6052 | |Field Name ||Description |
| 6053 | |`status`|| |
| 6054 | `OK`, the change can be submitted. + |
| 6055 | `NOT_READY`, additional labels are required before submit. + |
| 6056 | `CLOSED`, closed changes cannot be submitted. + |
| 6057 | `RULE_ERROR`, rule code failed with an error. |
| 6058 | |`ok`|optional| |
Edwin Kempin | fe29b81 | 2013-03-05 14:52:54 +0100 | [diff] [blame] | 6059 | Map of labels that are approved; an |
| 6060 | link:rest-api-accounts.html#account-info[AccountInfo] identifies the |
| 6061 | voter chosen by the rule. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6062 | |`reject`|optional| |
Edwin Kempin | fe29b81 | 2013-03-05 14:52:54 +0100 | [diff] [blame] | 6063 | Map of labels that are preventing submit; |
| 6064 | link:rest-api-accounts.html#account-info[AccountInfo] identifies voter. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6065 | |`need`|optional| |
| 6066 | Map of labels that need to be given to submit. The value is |
| 6067 | currently an empty object. |
| 6068 | |`may`|optional| |
| 6069 | Map of labels that can be used, but do not affect submit. |
Edwin Kempin | fe29b81 | 2013-03-05 14:52:54 +0100 | [diff] [blame] | 6070 | link:rest-api-accounts.html#account-info[AccountInfo] identifies voter, |
| 6071 | if the label has been applied. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 6072 | |`impossible`|optional| |
| 6073 | Map of labels that should have been in `need` but cannot be |
| 6074 | used by any user because of access restrictions. The value |
| 6075 | is currently an empty object. |
| 6076 | |`error_message`|optional| |
| 6077 | When status is RULE_ERROR this message provides some text describing |
| 6078 | the failure of the rule predicate. |
| 6079 | |=========================== |
| 6080 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 6081 | [[submitted-together-info]] |
| 6082 | === SubmittedTogetherInfo |
| 6083 | The `SubmittedTogetherInfo` entity contains information about a |
| 6084 | collection of changes that would be submitted together. |
| 6085 | |
| 6086 | [options="header",cols="1,6"] |
| 6087 | |=========================== |
| 6088 | |Field Name |Description |
| 6089 | |`changes` | |
| 6090 | A list of ChangeInfo entities representing the changes to be submitted together. |
| 6091 | |`non_visible_changes`| |
| 6092 | The number of changes to be submitted together that the current user |
| 6093 | cannot see. (This count includes changes that are visible to the |
| 6094 | current user when their reason for being submitted together involves |
| 6095 | changes the user cannot see.) |
| 6096 | |=========================== |
| 6097 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 6098 | [[suggested-reviewer-info]] |
| 6099 | === SuggestedReviewerInfo |
| 6100 | The `SuggestedReviewerInfo` entity contains information about a reviewer |
| 6101 | that can be added to a change (an account or a group). |
| 6102 | |
| 6103 | `SuggestedReviewerInfo` has either the `account` field that contains |
| 6104 | the link:rest-api-accounts.html#account-info[AccountInfo] entity, or |
| 6105 | the `group` field that contains the |
| 6106 | link:rest-api-changes.html#group-base-info[GroupBaseInfo] entity. |
| 6107 | |
Logan Hanks | ab3c81e | 2016-07-20 15:42:52 -0700 | [diff] [blame] | 6108 | [options="header",cols="1,^1,5"] |
| 6109 | |=========================== |
| 6110 | |Field Name ||Description |
| 6111 | |`account` |optional| |
| 6112 | An link:rest-api-accounts.html#account-info[AccountInfo] entity, if the |
| 6113 | suggestion is an account. |
| 6114 | |`group` |optional| |
| 6115 | A link:rest-api-changes.html#group-base-info[GroupBaseInfo] entity, if the |
| 6116 | suggestion is a group. |
| 6117 | |`count` || |
| 6118 | The total number of accounts in the suggestion. This is `1` if `account` is |
| 6119 | present. If `group` is present, the total number of accounts that are |
| 6120 | members of the group is returned (this count includes members of nested |
| 6121 | groups). |
| 6122 | |`confirm` |optional| |
| 6123 | True if `group` is present and `count` is above the threshold where the |
| 6124 | `confirmed` flag must be passed to add the group as a reviewer. |
| 6125 | |=========================== |
| 6126 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 6127 | [[topic-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6128 | === TopicInput |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 6129 | The `TopicInput` entity contains information for setting a topic. |
| 6130 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6131 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 6132 | |=========================== |
| 6133 | |Field Name ||Description |
| 6134 | |`topic` |optional|The topic. + |
| 6135 | The topic will be deleted if not set. |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 6136 | |=========================== |
| 6137 | |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 6138 | [[voting-range-info]] |
| 6139 | === VotingRangeInfo |
| 6140 | The `VotingRangeInfo` entity describes the continuous voting range from min |
| 6141 | to max values. |
| 6142 | |
| 6143 | [options="header",cols="1,6"] |
| 6144 | |====================== |
| 6145 | |Field Name|Description |
| 6146 | |`min` |The minimum voting value. |
| 6147 | |`max` |The maximum voting value. |
| 6148 | |====================== |
| 6149 | |
Edwin Kempin | bd885ff | 2014-04-11 16:11:56 +0200 | [diff] [blame] | 6150 | [[web-link-info]] |
| 6151 | === WebLinkInfo |
| 6152 | The `WebLinkInfo` entity describes a link to an external site. |
| 6153 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6154 | [options="header",cols="1,6"] |
Edwin Kempin | bd885ff | 2014-04-11 16:11:56 +0200 | [diff] [blame] | 6155 | |====================== |
| 6156 | |Field Name|Description |
| 6157 | |`name` |The link name. |
| 6158 | |`url` |The link URL. |
Sven Selberg | 5548420 | 2014-06-26 08:48:51 +0200 | [diff] [blame] | 6159 | |`image_url`|URL to the icon of the link. |
Edwin Kempin | bd885ff | 2014-04-11 16:11:56 +0200 | [diff] [blame] | 6160 | |====================== |
| 6161 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 6162 | GERRIT |
| 6163 | ------ |
| 6164 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 6165 | |
| 6166 | SEARCHBOX |
| 6167 | --------- |