Marian Harbach | ebeb154 | 2019-12-13 10:42:46 +0100 | [diff] [blame] | 1 | :linkattrs: |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2 | = Gerrit Code Review - /changes/ REST API |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 3 | |
| 4 | This page describes the change related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 8 | [[change-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 9 | == Change Endpoints |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 10 | |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 11 | [[create-change]] |
| 12 | === Create Change |
| 13 | -- |
David Pursehouse | a92d2e9 | 2017-08-03 06:03:47 +0000 | [diff] [blame] | 14 | 'POST /changes/' |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 15 | -- |
| 16 | |
Han-Wen Nienhuys | 0a24132 | 2021-02-15 18:01:48 +0100 | [diff] [blame] | 17 | The change input link:#change-input[ChangeInput] entity must be |
| 18 | provided in the request body. It is not allowed to create changes |
| 19 | under `refs/tags/` or Gerrit internal ref namespaces such as |
| 20 | `refs/changes/`, `refs/meta/external-ids/`, and `refs/users/`. The |
| 21 | request would fail with `400 Bad Request` in this case. |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 22 | |
Edwin Kempin | 088eeb9a | 2018-01-25 08:39:41 +0100 | [diff] [blame] | 23 | To create a change the calling user must be allowed to |
| 24 | link:access-control.html#category_push_review[upload to code review]. |
| 25 | |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 26 | .Request |
| 27 | ---- |
Paladox none | 4bac195 | 2017-08-03 00:09:25 +0000 | [diff] [blame] | 28 | POST /changes/ HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 29 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 30 | |
| 31 | { |
| 32 | "project" : "myProject", |
| 33 | "subject" : "Let's support 100% Gerrit workflow direct in browser", |
| 34 | "branch" : "master", |
| 35 | "topic" : "create-change-in-browser", |
David Ostrovsky | 6ffb7d9 | 2017-02-13 21:16:58 +0100 | [diff] [blame] | 36 | "status" : "NEW" |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 37 | } |
| 38 | ---- |
| 39 | |
| 40 | As response a link:#change-info[ChangeInfo] entity is returned that describes |
| 41 | the resulting change. |
| 42 | |
| 43 | .Response |
| 44 | ---- |
Paladox none | 4bac195 | 2017-08-03 00:09:25 +0000 | [diff] [blame] | 45 | HTTP/1.1 201 OK |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 46 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 47 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 48 | |
| 49 | )]}' |
| 50 | { |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 51 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 52 | "project": "myProject", |
| 53 | "branch": "master", |
| 54 | "topic": "create-change-in-browser", |
| 55 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 56 | "subject": "Let's support 100% Gerrit workflow direct in browser", |
David Ostrovsky | 6ffb7d9 | 2017-02-13 21:16:58 +0100 | [diff] [blame] | 57 | "status": "NEW", |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 58 | "created": "2014-05-05 07:15:44.639000000", |
| 59 | "updated": "2014-05-05 07:15:44.639000000", |
| 60 | "mergeable": true, |
| 61 | "insertions": 0, |
| 62 | "deletions": 0, |
David Ostrovsky | 837c0ee | 2014-04-27 12:54:20 +0200 | [diff] [blame] | 63 | "_number": 4711, |
| 64 | "owner": { |
| 65 | "name": "John Doe" |
| 66 | } |
| 67 | } |
| 68 | ---- |
| 69 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 70 | [[list-changes]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 71 | === Query Changes |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 72 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 73 | 'GET /changes/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 74 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 75 | |
Saša Živkov | dd80402 | 2014-06-23 16:44:03 +0200 | [diff] [blame] | 76 | Queries changes visible to the caller. The |
| 77 | link:user-search.html#_search_operators[query string] must be provided |
| 78 | by the `q` parameter. The `n` parameter can be used to limit the |
Patrick Hiesel | d6afdcf | 2020-01-07 15:03:28 +0100 | [diff] [blame] | 79 | returned results. The `no-limit` parameter can be used remove the default |
Jacek Centkowski | 34a2d6b | 2022-03-04 11:07:15 +0100 | [diff] [blame] | 80 | limit on queries and return all results (does not apply to anonymous requests). |
| 81 | This might not be supported by all index backends. |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 82 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 83 | As result a list of link:#change-info[ChangeInfo] entries is returned. |
| 84 | The change output is sorted by the last update time, most recently |
| 85 | updated to oldest updated. |
| 86 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 87 | Query for open changes of watched projects: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 88 | |
| 89 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 90 | ---- |
Edwin Kempin | 2091edb | 2013-01-23 19:07:38 +0100 | [diff] [blame] | 91 | GET /changes/?q=status:open+is:watched&n=2 HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 92 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 93 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 94 | .Response |
| 95 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 96 | HTTP/1.1 200 OK |
| 97 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 98 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 99 | |
| 100 | )]}' |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 101 | [ |
| 102 | { |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 103 | "id": "demo~master~Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 104 | "project": "demo", |
| 105 | "branch": "master", |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 106 | "attention_set": { |
| 107 | "1000096": { |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 108 | "account": { |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 109 | "_account_id": 1000096, |
| 110 | "name": "John Doe", |
| 111 | "email": "john.doe@example.com" |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 112 | }, |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 113 | "last_update": "2012-07-17 07:19:27.766000000", |
| 114 | "reason": "reviewer or cc replied" |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 115 | } |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 116 | }, |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 117 | "change_id": "Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 118 | "subject": "One change", |
| 119 | "status": "NEW", |
| 120 | "created": "2012-07-17 07:18:30.854000000", |
| 121 | "updated": "2012-07-17 07:19:27.766000000", |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 122 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 123 | "insertions": 26, |
| 124 | "deletions": 10, |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 125 | "_number": 1756, |
| 126 | "owner": { |
| 127 | "name": "John Doe" |
| 128 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 129 | }, |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 130 | { |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 131 | "id": "demo~master~I09c8041b5867d5b33170316e2abc34b79bbb8501", |
| 132 | "project": "demo", |
| 133 | "branch": "master", |
| 134 | "change_id": "I09c8041b5867d5b33170316e2abc34b79bbb8501", |
| 135 | "subject": "Another change", |
| 136 | "status": "NEW", |
| 137 | "created": "2012-07-17 07:18:30.884000000", |
| 138 | "updated": "2012-07-17 07:18:30.885000000", |
| 139 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 140 | "insertions": 12, |
| 141 | "deletions": 18, |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 142 | "_number": 1757, |
| 143 | "owner": { |
| 144 | "name": "John Doe" |
| 145 | }, |
| 146 | "_more_changes": true |
| 147 | } |
| 148 | ] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 149 | ---- |
| 150 | |
Sebastian Schuberth | 02bafe0 | 2016-01-20 21:38:11 +0100 | [diff] [blame] | 151 | If the number of changes matching the query exceeds either the internal |
| 152 | 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] | 153 | `_more_changes: true` JSON field set. |
| 154 | |
| 155 | The `S` or `start` query parameter can be supplied to skip a number |
| 156 | of changes from the list. |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 157 | |
Matthias Sohn | 0b2bf61 | 2020-12-24 00:15:32 +0100 | [diff] [blame] | 158 | Administrators can use the `skip-visibility` query parameter to skip visibility filtering. |
| 159 | This can be used to ensure that no changes are missed e.g. when querying for changes which |
| 160 | need to be reindexed. Without this parameter query results the user has no permission to read |
| 161 | are filtered out. REST requests with the skip-visibility option are rejected when the current |
| 162 | user doesn't have the ADMINISTRATE_SERVER capability. |
| 163 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 164 | Clients are allowed to specify more than one query by setting the `q` |
| 165 | parameter multiple times. In this case the result is an array of |
| 166 | arrays, one per query in the same order the queries were given in. |
| 167 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 168 | .Query for the 25 most recent open changes of the projects that you watch |
| 169 | **** |
| 170 | get::/changes/?q=status:open+is:watched&n=25 |
| 171 | **** |
| 172 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 173 | Query that retrieves changes for a user's dashboard: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 174 | |
| 175 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 176 | ---- |
| 177 | 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] | 178 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 179 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 180 | .Response |
| 181 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 182 | HTTP/1.1 200 OK |
| 183 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 184 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 185 | |
| 186 | )]}' |
| 187 | [ |
| 188 | [ |
| 189 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 190 | "id": "demo~master~Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 191 | "project": "demo", |
| 192 | "branch": "master", |
| 193 | "change_id": "Idaf5e098d70898b7119f6f4af5a6c13343d64b57", |
| 194 | "subject": "One change", |
| 195 | "status": "NEW", |
| 196 | "created": "2012-07-17 07:18:30.854000000", |
| 197 | "updated": "2012-07-17 07:19:27.766000000", |
Edwin Kempin | db1f0b8 | 2013-02-21 15:07:00 +0100 | [diff] [blame] | 198 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 199 | "insertions": 4, |
| 200 | "deletions": 7, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 201 | "_number": 1756, |
| 202 | "owner": { |
| 203 | "name": "John Doe" |
| 204 | }, |
| 205 | "labels": { |
| 206 | "Verified": {}, |
| 207 | "Code-Review": {} |
| 208 | } |
| 209 | } |
| 210 | ], |
| 211 | [], |
| 212 | [] |
| 213 | ] |
| 214 | ---- |
| 215 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 216 | .Query the changes for your user dashboard |
| 217 | **** |
| 218 | get::/changes/?q=is:open+owner:self&q=is:open+reviewer:self+-owner:self&q=is:closed+owner:self+limit:5&o=LABELS |
| 219 | **** |
| 220 | |
David Pursehouse | 2cf2843 | 2016-08-21 23:20:08 +0900 | [diff] [blame] | 221 | [[query-options]] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 222 | Additional fields can be obtained by adding `o` parameters, each |
| 223 | option requires more database lookups and slows down the query |
| 224 | response time to the client so they are generally disabled by |
| 225 | default. Optional fields are: |
| 226 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 227 | [[labels]] |
| 228 | -- |
Youssef Elghareeb | 9b3e021 | 2022-01-21 14:40:18 +0100 | [diff] [blame] | 229 | * `LABELS`: Includes the `labels` field which contains all information about |
| 230 | labels and approvers that have granted (or rejected) that label. Does not |
| 231 | include the `permitted_voting_range` attribute with the list of |
| 232 | link:#approval-info[ApprovalInfo] of the `all` attribute. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 233 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 234 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 235 | [[detailed-labels]] |
| 236 | -- |
Youssef Elghareeb | 9b3e021 | 2022-01-21 14:40:18 +0100 | [diff] [blame] | 237 | * `DETAILED_LABELS`: Includes the `labels` field which contains all information |
| 238 | about labels and approvers that have granted (or rejected) that label, including |
| 239 | the `permitted_voting_range` attribute with the list of |
| 240 | link:#approval-info[ApprovalInfo] of the `all` attribute. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 241 | -- |
Dave Borowitz | 4c7231a | 2013-01-30 16:18:59 -0800 | [diff] [blame] | 242 | |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 243 | [[submit-requirements]] |
| 244 | -- |
| 245 | * `SUBMIT_REQUIREMENTS`: detailed result of the evaluated submit requirements |
| 246 | for this change. |
| 247 | -- |
| 248 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 249 | [[current-revision]] |
| 250 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 251 | * `CURRENT_REVISION`: describe the current revision (patch set) |
| 252 | 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] | 253 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 254 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 255 | [[all-revisions]] |
| 256 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 257 | * `ALL_REVISIONS`: describe all revisions, not just current. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 258 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 259 | |
David Pursehouse | 025c1af | 2015-11-20 17:02:50 +0900 | [diff] [blame] | 260 | [[download-commands]] |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 261 | -- |
| 262 | * `DOWNLOAD_COMMANDS`: include the `commands` field in the |
| 263 | link:#fetch-info[FetchInfo] for revisions. Only valid when the |
| 264 | `CURRENT_REVISION` or `ALL_REVISIONS` option is selected. |
| 265 | -- |
| 266 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 267 | [[current-commit]] |
| 268 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 269 | * `CURRENT_COMMIT`: parse and output all header fields from the |
David Pursehouse | 98006e8 | 2013-10-02 10:15:52 +0900 | [diff] [blame] | 270 | commit object, including message. Only valid when the |
| 271 | `CURRENT_REVISION` or `ALL_REVISIONS` option is selected. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 272 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 273 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 274 | [[all-commits]] |
| 275 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 276 | * `ALL_COMMITS`: parse and output all header fields from the |
| 277 | output revisions. If only `CURRENT_REVISION` was requested |
| 278 | then only the current revision's commit data will be output. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 279 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 280 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 281 | [[current-files]] |
| 282 | -- |
Edwin Kempin | 8fd96b9 | 2016-12-05 16:39:03 +0100 | [diff] [blame] | 283 | * `CURRENT_FILES`: list files modified by the commit and magic files, |
| 284 | including basic line counts inserted/deleted per file. Only valid |
| 285 | when the `CURRENT_REVISION` or `ALL_REVISIONS` option is selected. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 286 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 287 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 288 | [[all-files]] |
| 289 | -- |
Edwin Kempin | 8fd96b9 | 2016-12-05 16:39:03 +0100 | [diff] [blame] | 290 | * `ALL_FILES`: list files modified by the commit and magic files, |
| 291 | including basic line counts inserted/deleted per file. If only the |
| 292 | `CURRENT_REVISION` was requested then only that commit's modified |
| 293 | files will be output. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 294 | -- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 295 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 296 | [[detailed-accounts]] |
| 297 | -- |
Edwin Kempin | 4a00e22 | 2013-10-16 14:34:24 +0200 | [diff] [blame] | 298 | * `DETAILED_ACCOUNTS`: include `_account_id`, `email` and `username` |
| 299 | fields when referencing accounts. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 300 | -- |
Dave Borowitz | 8926a88 | 2013-02-01 14:32:48 -0800 | [diff] [blame] | 301 | |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 302 | [[reviewer-updates]] |
| 303 | -- |
| 304 | * `REVIEWER_UPDATES`: include updates to reviewers set as |
| 305 | link:#review-update-info[ReviewerUpdateInfo] entities. |
| 306 | -- |
| 307 | |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 308 | [[messages]] |
| 309 | -- |
| 310 | * `MESSAGES`: include messages associated with the change. |
| 311 | -- |
| 312 | |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 313 | [[actions]] |
| 314 | -- |
| 315 | * `CURRENT_ACTIONS`: include information on available actions |
Stefan Beller | 09cd95d | 2015-02-12 13:40:23 -0800 | [diff] [blame] | 316 | for the change and its current revision. Ignored if the caller |
| 317 | is not authenticated. |
| 318 | -- |
| 319 | |
| 320 | [[change-actions]] |
| 321 | -- |
| 322 | * `CHANGE_ACTIONS`: include information on available |
| 323 | change actions for the change. Ignored if the caller |
| 324 | is not authenticated. |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 325 | -- |
| 326 | |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 327 | [[reviewed]] |
| 328 | -- |
Dave Borowitz | 86669b3 | 2015-05-27 14:56:10 -0700 | [diff] [blame] | 329 | * `REVIEWED`: include the `reviewed` field if all of the following are |
| 330 | true: |
Ardo Septama | 505f9ad | 2016-12-06 16:28:00 +0100 | [diff] [blame] | 331 | - the change is open |
| 332 | - the caller is authenticated |
| 333 | - the caller has commented on the change more recently than the last update |
Dave Borowitz | 86669b3 | 2015-05-27 14:56:10 -0700 | [diff] [blame] | 334 | from the change owner, i.e. this change would show up in the results of |
| 335 | link:user-search.html#reviewedby[reviewedby:self]. |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 336 | -- |
Gal Paikin | 3a2aa01 | 2019-06-21 18:30:01 +0200 | [diff] [blame] | 337 | [[skip_diffstat]] |
| 338 | -- |
| 339 | * `SKIP_DIFFSTAT`: skip the 'insertions' and 'deletions' field in link:#change-info[ChangeInfo]. |
| 340 | For large trees, their computation may be expensive. |
| 341 | -- |
Han-Wen Nienhuys | 19de6cd | 2018-01-16 13:15:38 +0100 | [diff] [blame] | 342 | |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 343 | [[submittable]] |
| 344 | -- |
Jonathan Nieder | ad5240f | 2016-10-04 11:03:23 -0700 | [diff] [blame] | 345 | * `SUBMITTABLE`: include the `submittable` field in link:#change-info[ChangeInfo], |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 346 | which can be used to tell if the change is reviewed and ready for submit. |
| 347 | -- |
| 348 | |
Khai Do | 2a23ec8 | 2014-09-19 16:33:02 -0700 | [diff] [blame] | 349 | [[web-links]] |
Sven Selberg | ae1a10c | 2014-02-14 14:24:29 +0100 | [diff] [blame] | 350 | -- |
Sven Selberg | d26bd54 | 2014-11-21 16:28:10 +0100 | [diff] [blame] | 351 | * `WEB_LINKS`: include the `web_links` field in link:#commit-info[CommitInfo], |
| 352 | therefore only valid in combination with `CURRENT_COMMIT` or |
| 353 | `ALL_COMMITS`. |
Sven Selberg | ae1a10c | 2014-02-14 14:24:29 +0100 | [diff] [blame] | 354 | -- |
| 355 | |
Dave Borowitz | 4c46c24 | 2014-12-03 16:46:45 -0800 | [diff] [blame] | 356 | [[check]] |
| 357 | -- |
| 358 | * `CHECK`: include potential problems with the change. |
| 359 | -- |
| 360 | |
Dave Borowitz | d5ebd9b | 2015-04-23 17:19:34 -0700 | [diff] [blame] | 361 | [[commit-footers]] |
| 362 | -- |
| 363 | * `COMMIT_FOOTERS`: include the full commit message with |
| 364 | Gerrit-specific commit footers in the |
| 365 | link:#revision-info[RevisionInfo]. |
Yuxuan 'fishy' Wang | 16baf21 | 2015-05-05 16:49:55 -0700 | [diff] [blame] | 366 | -- |
Dave Borowitz | d5ebd9b | 2015-04-23 17:19:34 -0700 | [diff] [blame] | 367 | |
Dave Borowitz | 6f58dbe | 2015-09-14 12:34:31 -0400 | [diff] [blame] | 368 | [[push-certificates]] |
| 369 | -- |
| 370 | * `PUSH_CERTIFICATES`: include push certificate information in the |
| 371 | link:#revision-info[RevisionInfo]. Ignored if signed push is not |
| 372 | link:config-gerrit.html#receive.enableSignedPush[enabled] on the |
| 373 | server. |
| 374 | -- |
| 375 | |
Makson Lee | 3568a93 | 2017-08-28 17:12:03 +0800 | [diff] [blame] | 376 | [[tracking-ids]] |
| 377 | -- |
| 378 | * `TRACKING_IDS`: include references to external tracking systems |
| 379 | as link:#tracking-id-info[TrackingIdInfo]. |
| 380 | -- |
| 381 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 382 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 383 | ---- |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 384 | 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] | 385 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 386 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 387 | .Response |
| 388 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 389 | HTTP/1.1 200 OK |
| 390 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 391 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 392 | |
| 393 | )]}' |
| 394 | [ |
| 395 | { |
David Pursehouse | c3be6ad | 2014-07-18 12:03:06 +0900 | [diff] [blame] | 396 | "id": "gerrit~master~I7ea46d2e2ee5c64c0d807677859cfb7d90b8966a", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 397 | "project": "gerrit", |
| 398 | "branch": "master", |
| 399 | "change_id": "I7ea46d2e2ee5c64c0d807677859cfb7d90b8966a", |
| 400 | "subject": "Use an EventBus to manage star icons", |
| 401 | "status": "NEW", |
| 402 | "created": "2012-04-25 00:52:25.580000000", |
| 403 | "updated": "2012-04-25 00:52:25.586000000", |
Edwin Kempin | db1f0b8 | 2013-02-21 15:07:00 +0100 | [diff] [blame] | 404 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 405 | "insertions": 16, |
| 406 | "deletions": 7, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 407 | "_number": 97, |
| 408 | "owner": { |
| 409 | "name": "Shawn Pearce" |
| 410 | }, |
| 411 | "current_revision": "184ebe53805e102605d11f6b143486d15c23a09c", |
| 412 | "revisions": { |
| 413 | "184ebe53805e102605d11f6b143486d15c23a09c": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 414 | "kind": "REWORK", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 415 | "_number": 1, |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 416 | "ref": "refs/changes/97/97/1", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 417 | "fetch": { |
| 418 | "git": { |
| 419 | "url": "git://localhost/gerrit", |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 420 | "ref": "refs/changes/97/97/1", |
| 421 | "commands": { |
| 422 | "Checkout": "git fetch git://localhost/gerrit refs/changes/97/97/1 \u0026\u0026 git checkout FETCH_HEAD", |
| 423 | "Cherry-Pick": "git fetch git://localhost/gerrit refs/changes/97/97/1 \u0026\u0026 git cherry-pick FETCH_HEAD", |
| 424 | "Format-Patch": "git fetch git://localhost/gerrit refs/changes/97/97/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", |
| 425 | "Pull": "git pull git://localhost/gerrit refs/changes/97/97/1" |
| 426 | } |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 427 | }, |
| 428 | "http": { |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 429 | "url": "http://myuser@127.0.0.1:8080/gerrit", |
| 430 | "ref": "refs/changes/97/97/1", |
| 431 | "commands": { |
| 432 | "Checkout": "git fetch http://myuser@127.0.0.1:8080/gerrit refs/changes/97/97/1 \u0026\u0026 git checkout FETCH_HEAD", |
| 433 | "Cherry-Pick": "git fetch http://myuser@127.0.0.1:8080/gerrit refs/changes/97/97/1 \u0026\u0026 git cherry-pick FETCH_HEAD", |
| 434 | "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", |
| 435 | "Pull": "git pull http://myuser@127.0.0.1:8080/gerrit refs/changes/97/97/1" |
| 436 | } |
| 437 | }, |
| 438 | "ssh": { |
| 439 | "url": "ssh://myuser@*:29418/gerrit", |
| 440 | "ref": "refs/changes/97/97/1", |
| 441 | "commands": { |
| 442 | "Checkout": "git fetch ssh://myuser@*:29418/gerrit refs/changes/97/97/1 \u0026\u0026 git checkout FETCH_HEAD", |
| 443 | "Cherry-Pick": "git fetch ssh://myuser@*:29418/gerrit refs/changes/97/97/1 \u0026\u0026 git cherry-pick FETCH_HEAD", |
| 444 | "Format-Patch": "git fetch ssh://myuser@*:29418/gerrit refs/changes/97/97/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD", |
| 445 | "Pull": "git pull ssh://myuser@*:29418/gerrit refs/changes/97/97/1" |
| 446 | } |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 447 | } |
| 448 | }, |
| 449 | "commit": { |
| 450 | "parents": [ |
| 451 | { |
| 452 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 453 | "subject": "Migrate contributor agreements to All-Projects." |
| 454 | } |
| 455 | ], |
| 456 | "author": { |
| 457 | "name": "Shawn O. Pearce", |
| 458 | "email": "sop@google.com", |
| 459 | "date": "2012-04-24 18:08:08.000000000", |
| 460 | "tz": -420 |
| 461 | }, |
| 462 | "committer": { |
| 463 | "name": "Shawn O. Pearce", |
| 464 | "email": "sop@google.com", |
| 465 | "date": "2012-04-24 18:08:08.000000000", |
| 466 | "tz": -420 |
| 467 | }, |
| 468 | "subject": "Use an EventBus to manage star icons", |
| 469 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 470 | }, |
| 471 | "files": { |
| 472 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeCache.java": { |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 473 | "lines_deleted": 8, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 474 | "size_delta": -412, |
| 475 | "size": 7782 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 476 | }, |
| 477 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeDetailCache.java": { |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 478 | "lines_inserted": 1, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 479 | "size_delta": 23, |
| 480 | "size": 6762 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 481 | }, |
| 482 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java": { |
| 483 | "lines_inserted": 11, |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 484 | "lines_deleted": 19, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 485 | "size_delta": -298, |
| 486 | "size": 47023 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 487 | }, |
| 488 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java": { |
| 489 | "lines_inserted": 23, |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 490 | "lines_deleted": 20, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 491 | "size_delta": 132, |
| 492 | "size": 17727 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 493 | }, |
| 494 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/StarCache.java": { |
| 495 | "status": "D", |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 496 | "lines_deleted": 139, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 497 | "size_delta": -5512, |
| 498 | "size": 13098 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 499 | }, |
| 500 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/StarredChanges.java": { |
| 501 | "status": "A", |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 502 | "lines_inserted": 204, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 503 | "size_delta": 8345, |
| 504 | "size": 8345 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 505 | }, |
| 506 | "gerrit-gwtui/src/main/java/com/google/gerrit/client/ui/Screen.java": { |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 507 | "lines_deleted": 9, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 508 | "size_delta": -343, |
| 509 | "size": 5385 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 510 | } |
| 511 | } |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | ] |
| 516 | ---- |
| 517 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 518 | [[get-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 519 | === Get Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 520 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 521 | 'GET /changes/link:#change-id[\{change-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 522 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 523 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 524 | Retrieves a change. |
| 525 | |
Dave Borowitz | 0314f73 | 2013-10-03 09:34:30 -0700 | [diff] [blame] | 526 | Additional fields can be obtained by adding `o` parameters, each |
| 527 | option requires more database lookups and slows down the query |
| 528 | response time to the client so they are generally disabled by |
| 529 | default. Fields are described in link:#list-changes[Query Changes]. |
| 530 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 531 | .Request |
| 532 | ---- |
| 533 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0 |
| 534 | ---- |
| 535 | |
| 536 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 537 | describes the change. |
| 538 | |
| 539 | .Response |
| 540 | ---- |
| 541 | HTTP/1.1 200 OK |
| 542 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 543 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 544 | |
| 545 | )]}' |
| 546 | { |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 547 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 548 | "project": "myProject", |
| 549 | "branch": "master", |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 550 | "attention_set": { |
| 551 | "1000096": { |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 552 | "account": { |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 553 | "_account_id": 1000096, |
| 554 | "name": "John Doe", |
| 555 | "email": "john.doe@example.com" |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 556 | }, |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 557 | "last_update": "2013-02-21 11:16:36.775000000", |
| 558 | "reason": "reviewer or cc replied" |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 559 | } |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 560 | }, |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 561 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 562 | "subject": "Implementing Feature X", |
| 563 | "status": "NEW", |
| 564 | "created": "2013-02-01 09:59:32.126000000", |
| 565 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 566 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 567 | "insertions": 34, |
| 568 | "deletions": 101, |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 569 | "_number": 3965, |
| 570 | "owner": { |
| 571 | "name": "John Doe" |
| 572 | } |
| 573 | } |
| 574 | ---- |
| 575 | |
Han-Wen Nienhuys | 63b81f2 | 2021-02-17 10:31:01 +0100 | [diff] [blame] | 576 | Historical state of the change can be retrieved by specifying the |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 577 | `meta=SHA-1` parameter. This will use a historical NoteDb snapshot to |
| 578 | populate ChangeInfo. If the SHA-1 is not reachable as a NoteDb state, |
Han-Wen Nienhuys | 63b81f2 | 2021-02-17 10:31:01 +0100 | [diff] [blame] | 579 | status code 412 is returned. |
| 580 | |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 581 | [[get-meta-diff]] |
| 582 | === Get Meta Diff |
| 583 | -- |
Han-Wen Nienhuys | 524317a | 2021-04-08 12:12:35 +0200 | [diff] [blame] | 584 | 'GET /changes/link:#change-id[\{change-id\}]/meta_diff?old=SHA-1&meta=SHA-1' |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 585 | -- |
| 586 | |
| 587 | Retrieves the difference between two historical states of a change |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 588 | by specifying the `old=SHA-1` and the `meta=SHA-1` parameters. |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 589 | |
| 590 | If the `old` parameter is not provided, the parent of the `meta` |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 591 | SHA-1 is used. If the `meta` parameter is not provided, the current |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 592 | state of the change is used. If neither are provided, the |
| 593 | difference between the current state of the change and its previous |
| 594 | state is returned. |
| 595 | |
| 596 | Additional fields can be obtained by adding `o` parameters, analogous |
| 597 | to link:#get-change[Get Change], and the same concerns for Get Change hold for |
| 598 | this endpoint too. Fields are described in link:#list-changes[Query Changes]. |
| 599 | |
| 600 | .Request |
| 601 | ---- |
| 602 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/meta_diff?old=b083abc34eb6dbdb9e154ba092fc198000e997b4&meta=63b81f2bde703ae07787a940e8fdf9a1828605b1 HTTP/1.0 |
| 603 | ---- |
| 604 | |
| 605 | As a response, two link:#change-info[ChangeInfo] entities are returned |
Alex Spradlin | 94099b6 | 2021-09-29 13:15:23 -0700 | [diff] [blame] | 606 | that describe information added and removed from the `old` change state, and |
| 607 | the two link:#change-info[ChangeInfo] entities that generated the diff are |
| 608 | returned. Only fields that differ between the change's two states are returned. |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 609 | |
| 610 | .Response |
| 611 | ---- |
| 612 | HTTP/1.1 200 OK |
| 613 | Content-Disposition: attachment |
| 614 | Content-Type: application/json; charset=UTF-8 |
| 615 | |
| 616 | )]}' |
| 617 | { |
| 618 | "added": { |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 619 | "attention_set": { |
| 620 | "1000096": { |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 621 | "account": { |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 622 | "_account_id": 1000096, |
| 623 | "name": "John Doe", |
| 624 | "email": "john.doe@example.com" |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 625 | }, |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 626 | "last_update": "2013-02-21 11:16:36.775000000", |
| 627 | "reason": "reviewer or cc replied" |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 628 | } |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 629 | }, |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 630 | "updated": "2013-02-21 11:16:36.775000000", |
| 631 | "topic": "new-topic" |
| 632 | }, |
| 633 | "removed": { |
Alex Spradlin | 94099b6 | 2021-09-29 13:15:23 -0700 | [diff] [blame] | 634 | "updated": "2013-02-01 09:59:32.126000000", |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 635 | "topic": "old-topic" |
Alex Spradlin | 94099b6 | 2021-09-29 13:15:23 -0700 | [diff] [blame] | 636 | }, |
| 637 | "old_change_info": { |
| 638 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 639 | "project": "myProject", |
| 640 | "branch": "master", |
| 641 | "attention_set": [], |
| 642 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 643 | "subject": "Implementing Feature X", |
| 644 | "status": "NEW", |
| 645 | "topic": "old-topic", |
| 646 | "created": "2013-02-01 09:59:32.126000000", |
| 647 | "updated": "2013-02-01 09:59:32.126000000", |
| 648 | "mergeable": true, |
| 649 | "insertions": 34, |
| 650 | "deletions": 101, |
| 651 | "_number": 3965, |
| 652 | "owner": { |
| 653 | "name": "John Doe" |
| 654 | } |
| 655 | }, |
| 656 | "new_change_info": { |
| 657 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 658 | "project": "myProject", |
| 659 | "branch": "master", |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 660 | "attention_set": { |
| 661 | "1000096": { |
Alex Spradlin | 94099b6 | 2021-09-29 13:15:23 -0700 | [diff] [blame] | 662 | "account": { |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 663 | "_account_id": 1000096, |
| 664 | "name": "John Doe", |
| 665 | "email": "john.doe@example.com" |
Alex Spradlin | 94099b6 | 2021-09-29 13:15:23 -0700 | [diff] [blame] | 666 | }, |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 667 | "last_update": "2013-02-21 11:16:36.775000000", |
| 668 | "reason": "reviewer or cc replied" |
Alex Spradlin | 94099b6 | 2021-09-29 13:15:23 -0700 | [diff] [blame] | 669 | } |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 670 | }, |
Alex Spradlin | 94099b6 | 2021-09-29 13:15:23 -0700 | [diff] [blame] | 671 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 672 | "subject": "Implementing Feature X", |
| 673 | "status": "NEW", |
| 674 | "topic": "new-topic", |
| 675 | "created": "2013-02-01 09:59:32.126000000", |
| 676 | "updated": "2013-02-21 11:16:36.775000000", |
| 677 | "mergeable": true, |
| 678 | "insertions": 34, |
| 679 | "deletions": 101, |
| 680 | "_number": 3965, |
| 681 | "owner": { |
| 682 | "name": "John Doe" |
| 683 | } |
| 684 | }, |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 685 | } |
| 686 | ---- |
| 687 | |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 688 | If the provided SHA-1 for `meta` is not reachable as a NoteDb |
| 689 | state, the status code 412 is returned. If the SHA-1 for `old` |
Alex Spradlin | b65494f | 2021-03-03 11:22:27 -0800 | [diff] [blame] | 690 | is not reachable, the difference between the change at state |
| 691 | `meta` and an empty change is returned. |
Han-Wen Nienhuys | 63b81f2 | 2021-02-17 10:31:01 +0100 | [diff] [blame] | 692 | |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 693 | [[get-change-detail]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 694 | === Get Change Detail |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 695 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 696 | 'GET /changes/link:#change-id[\{change-id\}]/detail' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 697 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 698 | |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 699 | Retrieves a change with link:#labels[labels], link:#detailed-labels[ |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 700 | detailed labels], link:#detailed-accounts[detailed accounts], |
| 701 | link:#reviewer-updates[reviewer updates], and link:#messages[messages]. |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 702 | |
Shawn Pearce | 7f3dccf | 2013-07-06 19:24:29 -0700 | [diff] [blame] | 703 | Additional fields can be obtained by adding `o` parameters, each |
| 704 | option requires more database lookups and slows down the query |
| 705 | response time to the client so they are generally disabled by |
| 706 | default. Fields are described in link:#list-changes[Query Changes]. |
| 707 | |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 708 | .Request |
| 709 | ---- |
| 710 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/detail HTTP/1.0 |
| 711 | ---- |
| 712 | |
| 713 | As response a link:#change-info[ChangeInfo] entity is returned that |
Khai Do | ad63201 | 2014-06-22 08:29:57 -0700 | [diff] [blame] | 714 | describes the change. This response will contain all votes for each |
| 715 | label and include one combined vote. The combined label vote is |
| 716 | calculated in the following order (from highest to lowest): |
| 717 | REJECTED > APPROVED > DISLIKED > RECOMMENDED. |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 718 | |
| 719 | .Response |
| 720 | ---- |
| 721 | HTTP/1.1 200 OK |
| 722 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 723 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 724 | |
| 725 | )]}' |
| 726 | { |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 727 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 728 | "project": "myProject", |
| 729 | "branch": "master", |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 730 | "attention_set": { |
| 731 | "1000096": { |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 732 | "account": { |
| 733 | "_account_id": 1000096, |
| 734 | "name": "John Doe", |
| 735 | "email": "john.doe@example.com", |
| 736 | "username": "jdoe" |
| 737 | }, |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 738 | "last_update": "2013-02-21 11:16:36.775000000", |
| 739 | "reason": "reviewer or cc replied" |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 740 | } |
Edwin Kempin | 065e5a2 | 2022-12-19 13:34:10 +0100 | [diff] [blame] | 741 | }, |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 742 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 743 | "subject": "Implementing Feature X", |
| 744 | "status": "NEW", |
| 745 | "created": "2013-02-01 09:59:32.126000000", |
| 746 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 747 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 748 | "insertions": 126, |
| 749 | "deletions": 11, |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 750 | "_number": 3965, |
| 751 | "owner": { |
| 752 | "_account_id": 1000096, |
| 753 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 754 | "email": "john.doe@example.com", |
| 755 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 756 | }, |
| 757 | "labels": { |
| 758 | "Verified": { |
| 759 | "all": [ |
| 760 | { |
| 761 | "value": 0, |
| 762 | "_account_id": 1000096, |
| 763 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 764 | "email": "john.doe@example.com", |
| 765 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 766 | }, |
| 767 | { |
| 768 | "value": 0, |
| 769 | "_account_id": 1000097, |
| 770 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 771 | "email": "jane.roe@example.com", |
| 772 | "username": "jroe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 773 | } |
| 774 | ], |
| 775 | "values": { |
| 776 | "-1": "Fails", |
| 777 | " 0": "No score", |
| 778 | "+1": "Verified" |
| 779 | } |
| 780 | }, |
| 781 | "Code-Review": { |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 782 | "disliked": { |
| 783 | "_account_id": 1000096, |
| 784 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 785 | "email": "john.doe@example.com", |
| 786 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 787 | }, |
| 788 | "all": [ |
| 789 | { |
| 790 | "value": -1, |
| 791 | "_account_id": 1000096, |
| 792 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 793 | "email": "john.doe@example.com", |
| 794 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 795 | }, |
| 796 | { |
| 797 | "value": 1, |
| 798 | "_account_id": 1000097, |
| 799 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 800 | "email": "jane.roe@example.com", |
| 801 | "username": "jroe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 802 | } |
| 803 | ] |
| 804 | "values": { |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 805 | "-2": "This shall not be submitted", |
| 806 | "-1": "I would prefer this is not submitted as is", |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 807 | " 0": "No score", |
| 808 | "+1": "Looks good to me, but someone else must approve", |
| 809 | "+2": "Looks good to me, approved" |
| 810 | } |
| 811 | } |
| 812 | }, |
| 813 | "permitted_labels": { |
| 814 | "Verified": [ |
| 815 | "-1", |
| 816 | " 0", |
| 817 | "+1" |
| 818 | ], |
| 819 | "Code-Review": [ |
| 820 | "-2", |
| 821 | "-1", |
| 822 | " 0", |
| 823 | "+1", |
| 824 | "+2" |
| 825 | ] |
| 826 | }, |
Nitzan Gur-Furman | d122357 | 2023-01-16 12:07:46 +0000 | [diff] [blame] | 827 | "removable_labels": { |
| 828 | "Code-Review": { |
| 829 | "-1": [ |
| 830 | { |
| 831 | "_account_id": 1000096, |
| 832 | "name": "John Doe", |
| 833 | "email": "john.doe@example.com", |
| 834 | "username": "jdoe" |
| 835 | } |
| 836 | ], |
| 837 | "+1": [ |
| 838 | { |
| 839 | "_account_id": 1000097, |
| 840 | "name": "Jane Roe", |
| 841 | "email": "jane.roe@example.com", |
| 842 | "username": "jroe" |
| 843 | } |
| 844 | ] |
| 845 | } |
| 846 | }, |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 847 | "removable_reviewers": [ |
| 848 | { |
| 849 | "_account_id": 1000096, |
| 850 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 851 | "email": "john.doe@example.com", |
| 852 | "username": "jdoe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 853 | }, |
| 854 | { |
| 855 | "_account_id": 1000097, |
| 856 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 857 | "email": "jane.roe@example.com", |
| 858 | "username": "jroe" |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 859 | } |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 860 | ], |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 861 | "reviewers": { |
| 862 | "REVIEWER": [ |
| 863 | { |
| 864 | "_account_id": 1000096, |
| 865 | "name": "John Doe", |
| 866 | "email": "john.doe@example.com", |
| 867 | "username": "jdoe" |
| 868 | }, |
| 869 | { |
| 870 | "_account_id": 1000097, |
| 871 | "name": "Jane Roe", |
| 872 | "email": "jane.roe@example.com", |
| 873 | "username": "jroe" |
| 874 | } |
| 875 | ] |
| 876 | }, |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 877 | "reviewer_updates": [ |
| 878 | { |
| 879 | "state": "REVIEWER", |
| 880 | "reviewer": { |
| 881 | "_account_id": 1000096, |
| 882 | "name": "John Doe", |
| 883 | "email": "john.doe@example.com", |
| 884 | "username": "jdoe" |
| 885 | }, |
| 886 | "updated_by": { |
| 887 | "_account_id": 1000096, |
| 888 | "name": "John Doe", |
| 889 | "email": "john.doe@example.com", |
| 890 | "username": "jdoe" |
| 891 | }, |
| 892 | "updated": "2016-07-21 20:12:39.000000000" |
| 893 | }, |
| 894 | { |
| 895 | "state": "REMOVED", |
| 896 | "reviewer": { |
| 897 | "_account_id": 1000096, |
| 898 | "name": "John Doe", |
| 899 | "email": "john.doe@example.com", |
| 900 | "username": "jdoe" |
| 901 | }, |
| 902 | "updated_by": { |
| 903 | "_account_id": 1000096, |
| 904 | "name": "John Doe", |
| 905 | "email": "john.doe@example.com", |
| 906 | "username": "jdoe" |
| 907 | }, |
| 908 | "updated": "2016-07-21 20:12:33.000000000" |
| 909 | }, |
| 910 | { |
| 911 | "state": "CC", |
| 912 | "reviewer": { |
| 913 | "_account_id": 1000096, |
| 914 | "name": "John Doe", |
| 915 | "email": "john.doe@example.com", |
| 916 | "username": "jdoe" |
| 917 | }, |
| 918 | "updated_by": { |
| 919 | "_account_id": 1000096, |
| 920 | "name": "John Doe", |
| 921 | "email": "john.doe@example.com", |
| 922 | "username": "jdoe" |
| 923 | }, |
| 924 | "updated": "2016-03-23 21:34:02.419000000", |
| 925 | }, |
| 926 | ], |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 927 | "messages": [ |
| 928 | { |
| 929 | "id": "YH-egE", |
| 930 | "author": { |
| 931 | "_account_id": 1000096, |
| 932 | "name": "John Doe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 933 | "email": "john.doe@example.com", |
| 934 | "username": "jdoe" |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 935 | }, |
Gustaf Lundh | 3c4f3f0 | 2017-11-06 13:52:28 +0100 | [diff] [blame] | 936 | "date": "2013-03-23 21:34:02.419000000", |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 937 | "message": "Patch Set 1:\n\nThis is the first message.", |
Gustaf Lundh | 3c4f3f0 | 2017-11-06 13:52:28 +0100 | [diff] [blame] | 938 | "_revision_number": 1 |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 939 | }, |
| 940 | { |
| 941 | "id": "WEEdhU", |
| 942 | "author": { |
| 943 | "_account_id": 1000097, |
| 944 | "name": "Jane Roe", |
Edwin Kempin | 65886f0 | 2013-10-16 15:03:17 +0200 | [diff] [blame] | 945 | "email": "jane.roe@example.com", |
| 946 | "username": "jroe" |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 947 | }, |
Gustaf Lundh | 3c4f3f0 | 2017-11-06 13:52:28 +0100 | [diff] [blame] | 948 | "date": "2013-03-23 21:36:52.332000000", |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 949 | "message": "Patch Set 1:\n\nThis is the second message.\n\nWith a line break.", |
Gustaf Lundh | 3c4f3f0 | 2017-11-06 13:52:28 +0100 | [diff] [blame] | 950 | "_revision_number": 1 |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 951 | } |
Edwin Kempin | 8e49220 | 2013-02-21 15:38:25 +0100 | [diff] [blame] | 952 | ] |
| 953 | } |
| 954 | ---- |
| 955 | |
Aaron Gable | 9b41307 | 2017-08-24 13:15:21 -0700 | [diff] [blame] | 956 | [[create-merge-patch-set-for-change]] |
| 957 | === Create Merge Patch Set For Change |
| 958 | -- |
| 959 | 'POST /changes/link:#change-id[\{change-id\}]/merge' |
| 960 | -- |
| 961 | |
| 962 | Update an existing change by using a |
| 963 | link:#merge-patch-set-input[MergePatchSetInput] entity. |
| 964 | |
| 965 | Gerrit will create a merge commit based on the information of |
| 966 | MergePatchSetInput and add a new patch set to the change corresponding |
| 967 | to the new merge commit. |
| 968 | |
| 969 | .Request |
| 970 | ---- |
| 971 | POST /changes/test~master~Ic5466d107c5294414710935a8ef3b0180fb848dc/merge HTTP/1.0 |
| 972 | Content-Type: application/json; charset=UTF-8 |
| 973 | |
| 974 | { |
| 975 | "subject": "Merge dev_branch into master", |
| 976 | "merge": { |
David Pursehouse | f4fb104 | 2018-03-18 23:03:46 +0900 | [diff] [blame] | 977 | "source": "refs/changes/34/1234/1" |
Aaron Gable | 9b41307 | 2017-08-24 13:15:21 -0700 | [diff] [blame] | 978 | } |
| 979 | } |
| 980 | ---- |
| 981 | |
| 982 | As response a link:#change-info[ChangeInfo] entity with current revision is |
| 983 | returned that describes the resulting change. |
| 984 | |
| 985 | .Response |
| 986 | ---- |
| 987 | HTTP/1.1 200 OK |
| 988 | Content-Disposition: attachment |
| 989 | Content-Type: application/json; charset=UTF-8 |
| 990 | |
| 991 | )]}' |
| 992 | { |
| 993 | "id": "test~master~Ic5466d107c5294414710935a8ef3b0180fb848dc", |
| 994 | "project": "test", |
| 995 | "branch": "master", |
| 996 | "hashtags": [], |
| 997 | "change_id": "Ic5466d107c5294414710935a8ef3b0180fb848dc", |
| 998 | "subject": "Merge dev_branch into master", |
| 999 | "status": "NEW", |
| 1000 | "created": "2016-09-23 18:08:53.238000000", |
| 1001 | "updated": "2016-09-23 18:09:25.934000000", |
| 1002 | "submit_type": "MERGE_IF_NECESSARY", |
| 1003 | "mergeable": true, |
| 1004 | "insertions": 5, |
| 1005 | "deletions": 0, |
| 1006 | "_number": 72, |
| 1007 | "owner": { |
| 1008 | "_account_id": 1000000 |
| 1009 | }, |
| 1010 | "current_revision": "27cc4558b5a3d3387dd11ee2df7a117e7e581822" |
| 1011 | } |
| 1012 | ---- |
| 1013 | |
| 1014 | [[set-message]] |
| 1015 | === Set Commit Message |
| 1016 | -- |
| 1017 | 'PUT /changes/link:#change-id[\{change-id\}]/message' |
| 1018 | -- |
| 1019 | |
| 1020 | Creates a new patch set with a new commit message. |
| 1021 | |
| 1022 | The new commit message must be provided in the request body inside a |
Han-Wen Nienhuys | 098580a | 2019-07-24 20:17:41 +0200 | [diff] [blame] | 1023 | link:#commit-message-input[CommitMessageInput] entity. If a Change-Id |
| 1024 | footer is specified, it must match the current Change-Id footer. If |
| 1025 | the Change-Id footer is absent, the current Change-Id is added to the |
| 1026 | message. |
Aaron Gable | 9b41307 | 2017-08-24 13:15:21 -0700 | [diff] [blame] | 1027 | |
| 1028 | .Request |
| 1029 | ---- |
| 1030 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/message HTTP/1.0 |
| 1031 | Content-Type: application/json; charset=UTF-8 |
| 1032 | |
| 1033 | { |
| 1034 | "message": "New Commit message \n\nChange-Id: I10394472cbd17dd12454f229e4f6de00b143a444\n" |
| 1035 | } |
| 1036 | ---- |
| 1037 | |
| 1038 | .Notifications |
| 1039 | |
| 1040 | An email will be sent using the "newpatchset" template. |
| 1041 | |
| 1042 | [options="header",cols="1,1"] |
| 1043 | |============================= |
| 1044 | |WIP State |Default |
| 1045 | |Ready for review|owner, reviewers, CCs, stars, NEW_PATCHSETS watchers |
| 1046 | |Work in progress|owner |
| 1047 | |============================= |
| 1048 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1049 | [[get-topic]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1050 | === Get Topic |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1051 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1052 | 'GET /changes/link:#change-id[\{change-id\}]/topic' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1053 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1054 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1055 | Retrieves the topic of a change. |
| 1056 | |
| 1057 | .Request |
| 1058 | ---- |
| 1059 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0 |
| 1060 | ---- |
| 1061 | |
| 1062 | .Response |
| 1063 | ---- |
| 1064 | HTTP/1.1 200 OK |
| 1065 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1066 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1067 | |
| 1068 | )]}' |
| 1069 | "Documentation" |
| 1070 | ---- |
| 1071 | |
| 1072 | If the change does not have a topic an empty string is returned. |
| 1073 | |
| 1074 | [[set-topic]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1075 | === Set Topic |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1076 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1077 | 'PUT /changes/link:#change-id[\{change-id\}]/topic' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1078 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1079 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1080 | Sets the topic of a change. |
| 1081 | |
| 1082 | The new topic must be provided in the request body inside a |
Patrick Hiesel | 4aa1456 | 2018-06-19 15:07:50 +0200 | [diff] [blame] | 1083 | link:#topic-input[TopicInput] entity. Any leading or trailing whitespace |
| 1084 | in the topic name will be removed. |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1085 | |
| 1086 | .Request |
| 1087 | ---- |
| 1088 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1089 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1090 | |
| 1091 | { |
| 1092 | "topic": "Documentation" |
| 1093 | } |
| 1094 | ---- |
| 1095 | |
| 1096 | As response the new topic is returned. |
| 1097 | |
| 1098 | .Response |
| 1099 | ---- |
| 1100 | HTTP/1.1 200 OK |
| 1101 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1102 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1103 | |
| 1104 | )]}' |
| 1105 | "Documentation" |
| 1106 | ---- |
| 1107 | |
| 1108 | If the topic was deleted the response is "`204 No Content`". |
| 1109 | |
| 1110 | [[delete-topic]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1111 | === Delete Topic |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1112 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1113 | 'DELETE /changes/link:#change-id[\{change-id\}]/topic' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1114 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1115 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1116 | Deletes the topic of a change. |
| 1117 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 1118 | .Request |
| 1119 | ---- |
| 1120 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topic HTTP/1.0 |
| 1121 | ---- |
| 1122 | |
| 1123 | .Response |
| 1124 | ---- |
| 1125 | HTTP/1.1 204 No Content |
| 1126 | ---- |
| 1127 | |
Patrick Hiesel | bb84fd7 | 2017-08-23 11:11:22 +0200 | [diff] [blame] | 1128 | [[get-pure-revert]] |
| 1129 | === Get Pure Revert |
| 1130 | -- |
| 1131 | 'GET /changes/link:#change-id[\{change-id\}]/pure_revert' |
| 1132 | -- |
| 1133 | |
| 1134 | Check if the given change is a pure revert of the change it references in `revertOf`. |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 1135 | Optionally, the query parameter `o` can be passed in to specify a commit (SHA-1 in |
Patrick Hiesel | bb84fd7 | 2017-08-23 11:11:22 +0200 | [diff] [blame] | 1136 | 40 digit hex representation) to check against. It takes precedence over `revertOf`. |
| 1137 | If the change has no reference in `revertOf`, the parameter is mandatory. |
| 1138 | |
| 1139 | As response a link:#pure-revert-info[PureRevertInfo] entity is returned. |
| 1140 | |
| 1141 | .Request |
| 1142 | ---- |
| 1143 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/pure_revert?o=247bccf56ae47634650bcc08b8aa784c3580ccas HTTP/1.0 |
| 1144 | ---- |
| 1145 | |
| 1146 | .Response |
| 1147 | ---- |
| 1148 | HTTP/1.1 200 OK |
| 1149 | Content-Disposition: attachment |
| 1150 | Content-Type: application/json; charset=UTF-8 |
| 1151 | |
| 1152 | )]}' |
| 1153 | { |
| 1154 | "is_pure_revert" : false |
| 1155 | } |
| 1156 | ---- |
| 1157 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1158 | [[abandon-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1159 | === Abandon Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1160 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1161 | 'POST /changes/link:#change-id[\{change-id\}]/abandon' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1162 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1163 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1164 | Abandons a change. |
| 1165 | |
| 1166 | The request body does not need to include a link:#abandon-input[ |
| 1167 | AbandonInput] entity if no review comment is added. |
| 1168 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 1169 | Abandoning a change also removes all users from the link:#attention-set[attention set]. |
| 1170 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1171 | .Request |
| 1172 | ---- |
| 1173 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/abandon HTTP/1.0 |
| 1174 | ---- |
| 1175 | |
| 1176 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1177 | describes the abandoned change. |
| 1178 | |
| 1179 | .Response |
| 1180 | ---- |
| 1181 | HTTP/1.1 200 OK |
| 1182 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1183 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1184 | |
| 1185 | )]}' |
| 1186 | { |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1187 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1188 | "project": "myProject", |
| 1189 | "branch": "master", |
| 1190 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1191 | "subject": "Implementing Feature X", |
| 1192 | "status": "ABANDONED", |
| 1193 | "created": "2013-02-01 09:59:32.126000000", |
| 1194 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1195 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1196 | "insertions": 3, |
| 1197 | "deletions": 310, |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1198 | "_number": 3965, |
| 1199 | "owner": { |
| 1200 | "name": "John Doe" |
| 1201 | } |
| 1202 | } |
| 1203 | ---- |
| 1204 | |
| 1205 | If the change cannot be abandoned because the change state doesn't |
| 1206 | allow abandoning of the change, the response is "`409 Conflict`" and |
| 1207 | the error message is contained in the response body. |
| 1208 | |
| 1209 | .Response |
| 1210 | ---- |
| 1211 | HTTP/1.1 409 Conflict |
| 1212 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1213 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1214 | |
| 1215 | change is merged |
| 1216 | ---- |
| 1217 | |
Logan Hanks | e43b68e | 2017-05-23 13:16:22 -0700 | [diff] [blame] | 1218 | .Notifications |
| 1219 | |
| 1220 | An email will be sent using the "abandon" template. The notify handling is ALL. |
| 1221 | Notifications are suppressed on WIP changes that have never started review. |
| 1222 | |
Logan Hanks | 8760741 | 2017-05-30 13:49:04 -0700 | [diff] [blame] | 1223 | [options="header",cols="1,2"] |
Logan Hanks | e43b68e | 2017-05-23 13:16:22 -0700 | [diff] [blame] | 1224 | |============================= |
Logan Hanks | 8760741 | 2017-05-30 13:49:04 -0700 | [diff] [blame] | 1225 | |WIP State |notify=ALL |
Logan Hanks | e43b68e | 2017-05-23 13:16:22 -0700 | [diff] [blame] | 1226 | |Ready for review|owner, reviewers, CCs, stars, ABANDONED_CHANGES watchers |
| 1227 | |Work in progress|not sent |
| 1228 | |Reviewable WIP |owner, reviewers, CCs, stars, ABANDONED_CHANGES watchers |
| 1229 | |============================= |
| 1230 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1231 | [[restore-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1232 | === Restore Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1233 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1234 | 'POST /changes/link:#change-id[\{change-id\}]/restore' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1235 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1236 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1237 | Restores a change. |
| 1238 | |
| 1239 | The request body does not need to include a link:#restore-input[ |
| 1240 | RestoreInput] entity if no review comment is added. |
| 1241 | |
| 1242 | .Request |
| 1243 | ---- |
| 1244 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/restore HTTP/1.0 |
| 1245 | ---- |
| 1246 | |
| 1247 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1248 | describes the restored change. |
| 1249 | |
| 1250 | .Response |
| 1251 | ---- |
| 1252 | HTTP/1.1 200 OK |
| 1253 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1254 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1255 | |
| 1256 | )]}' |
| 1257 | { |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1258 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1259 | "project": "myProject", |
| 1260 | "branch": "master", |
| 1261 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1262 | "subject": "Implementing Feature X", |
| 1263 | "status": "NEW", |
| 1264 | "created": "2013-02-01 09:59:32.126000000", |
| 1265 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1266 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1267 | "insertions": 2, |
| 1268 | "deletions": 13, |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1269 | "_number": 3965, |
| 1270 | "owner": { |
| 1271 | "name": "John Doe" |
| 1272 | } |
| 1273 | } |
| 1274 | ---- |
| 1275 | |
| 1276 | If the change cannot be restored because the change state doesn't |
| 1277 | allow restoring the change, the response is "`409 Conflict`" and |
| 1278 | the error message is contained in the response body. |
| 1279 | |
| 1280 | .Response |
| 1281 | ---- |
| 1282 | HTTP/1.1 409 Conflict |
| 1283 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1284 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 1285 | |
| 1286 | change is new |
| 1287 | ---- |
| 1288 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1289 | [[rebase-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1290 | === Rebase Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1291 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1292 | 'POST /changes/link:#change-id[\{change-id\}]/rebase' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1293 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1294 | |
| 1295 | Rebases a change. |
| 1296 | |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 1297 | Optionally, the parent revision can be changed to another patch set through the |
| 1298 | link:#rebase-input[RebaseInput] entity. |
| 1299 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1300 | .Request |
| 1301 | ---- |
| 1302 | POST /changes/myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2/rebase HTTP/1.0 |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 1303 | Content-Type: application/json;charset=UTF-8 |
| 1304 | |
| 1305 | { |
| 1306 | "base" : "1234", |
| 1307 | } |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1308 | ---- |
| 1309 | |
| 1310 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1311 | describes the rebased change. Information about the current patch set |
| 1312 | is included. |
| 1313 | |
| 1314 | .Response |
| 1315 | ---- |
| 1316 | HTTP/1.1 200 OK |
| 1317 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1318 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1319 | |
| 1320 | )]}' |
| 1321 | { |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1322 | "id": "myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 1323 | "project": "myProject", |
| 1324 | "branch": "master", |
| 1325 | "change_id": "I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 1326 | "subject": "Implement Feature X", |
| 1327 | "status": "NEW", |
| 1328 | "created": "2013-02-01 09:59:32.126000000", |
| 1329 | "updated": "2013-02-21 11:16:36.775000000", |
| 1330 | "mergeable": false, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1331 | "insertions": 33, |
| 1332 | "deletions": 9, |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1333 | "_number": 4799, |
| 1334 | "owner": { |
| 1335 | "name": "John Doe" |
| 1336 | }, |
| 1337 | "current_revision": "27cc4558b5a3d3387dd11ee2df7a117e7e581822", |
| 1338 | "revisions": { |
| 1339 | "27cc4558b5a3d3387dd11ee2df7a117e7e581822": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 1340 | "kind": "REWORK", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1341 | "_number": 2, |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 1342 | "ref": "refs/changes/99/4799/2", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1343 | "fetch": { |
| 1344 | "http": { |
| 1345 | "url": "http://gerrit:8080/myProject", |
| 1346 | "ref": "refs/changes/99/4799/2" |
| 1347 | } |
| 1348 | }, |
| 1349 | "commit": { |
| 1350 | "parents": [ |
| 1351 | { |
| 1352 | "commit": "b4003890dadd406d80222bf1ad8aca09a4876b70", |
| 1353 | "subject": "Implement Feature A" |
| 1354 | } |
Yuxuan Wang | cc598ac | 2016-07-12 17:11:05 +0000 | [diff] [blame] | 1355 | ], |
| 1356 | "author": { |
| 1357 | "name": "John Doe", |
| 1358 | "email": "john.doe@example.com", |
| 1359 | "date": "2013-05-07 15:21:27.000000000", |
| 1360 | "tz": 120 |
| 1361 | }, |
| 1362 | "committer": { |
| 1363 | "name": "Gerrit Code Review", |
| 1364 | "email": "gerrit-server@example.com", |
| 1365 | "date": "2013-05-07 15:35:43.000000000", |
| 1366 | "tz": 120 |
| 1367 | }, |
| 1368 | "subject": "Implement Feature X", |
| 1369 | "message": "Implement Feature X\n\nAdded feature X." |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1370 | } |
| 1371 | } |
| 1372 | } |
| 1373 | ---- |
| 1374 | |
| 1375 | If the change cannot be rebased, e.g. due to conflicts, the response is |
| 1376 | "`409 Conflict`" and the error message is contained in the response |
| 1377 | body. |
| 1378 | |
| 1379 | .Response |
| 1380 | ---- |
| 1381 | HTTP/1.1 409 Conflict |
| 1382 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1383 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 1384 | |
| 1385 | The change could not be rebased due to a path conflict during merge. |
| 1386 | ---- |
| 1387 | |
Nitzan Gur-Furman | 4655d8b | 2022-12-16 08:46:18 +0100 | [diff] [blame] | 1388 | [[rebase-chain]] |
| 1389 | === Rebase Chain |
| 1390 | -- |
| 1391 | 'POST /changes/link:#change-id[\{change-id\}]/rebase:chain' |
| 1392 | -- |
| 1393 | |
| 1394 | Rebases an ancestry chain of changes. |
| 1395 | |
| 1396 | The operated change is treated as the chain tip. All unsubmitted ancestors are rebased. |
| 1397 | |
| 1398 | Requires a linear ancestry relation (single parenting throughout the chain). |
| 1399 | |
| 1400 | Optionally, the parent revision (of the oldest ancestor to be rebased) can be changed to another |
| 1401 | change, revision or branch through the link:#rebase-input[RebaseInput] entity. |
| 1402 | |
| 1403 | If the chain is outdated, i.e., there's a change that depends on an old revision of its parent, the |
| 1404 | result is the same as individually rebasing all outdated changes on top of their parent's latest |
| 1405 | revision before running the rebase chain action. |
| 1406 | |
| 1407 | .Request |
| 1408 | ---- |
| 1409 | POST /changes/myProject~master~I08a021fb07b83fe845140a2c11508b3bdd93b48f/rebase:chain HTTP/1.0 |
| 1410 | Content-Type: application/json;charset=UTF-8 |
| 1411 | |
| 1412 | { |
| 1413 | "base" : "1234", |
| 1414 | } |
| 1415 | ---- |
| 1416 | |
| 1417 | As response a link:#rebase-chain-info[RebaseChainInfo] entity is returned that |
| 1418 | describes the rebased changes. Information about the current patch sets |
| 1419 | are included. |
| 1420 | |
| 1421 | .Response |
| 1422 | ---- |
| 1423 | HTTP/1.1 200 OK |
| 1424 | Content-Disposition: attachment |
| 1425 | Content-Type: application/json; charset=UTF-8 |
| 1426 | |
| 1427 | )]}' |
| 1428 | { |
| 1429 | "rebased_changes": [ |
| 1430 | { |
| 1431 | "id": "myProject~master~I0e534de9d7f0d6f35b71f7d726acf835b2110c66", |
| 1432 | "project": "myProject", |
| 1433 | "branch": "master", |
| 1434 | "hashtags": [ |
| 1435 | |
| 1436 | ], |
| 1437 | "change_id": "I0e534de9d7f0d6f35b71f7d726acf835b2110c66", |
| 1438 | "subject": "456", |
| 1439 | "status": "NEW", |
| 1440 | "created": "2022-11-21 20: 51: 31.000000000", |
| 1441 | "updated": "2022-11-21 20: 56: 49.000000000", |
| 1442 | "submit_type": "MERGE_IF_NECESSARY", |
| 1443 | "insertions": 0, |
| 1444 | "deletions": 0, |
| 1445 | "total_comment_count": 0, |
| 1446 | "unresolved_comment_count": 0, |
| 1447 | "has_review_started": true, |
| 1448 | "meta_rev_id": "a2a6692213f546e1045ecf4647439fac8d6d8faa", |
| 1449 | "_number": 21, |
| 1450 | "owner": { |
| 1451 | "_account_id": 1000000 |
| 1452 | }, |
| 1453 | "current_revision": "c3b2ba222d42a56e05c90f88d4509a124620517d", |
| 1454 | "revisions": { |
| 1455 | "c3b2ba222d42a56e05c90f88d4509a124620517d": { |
| 1456 | "kind": "NO_CHANGE", |
| 1457 | "_number": 2, |
| 1458 | "created": "2022-11-21 20: 56: 49.000000000", |
| 1459 | "uploader": { |
| 1460 | "_account_id": 1000000 |
| 1461 | }, |
| 1462 | "ref": "refs/changes/21/21/2", |
| 1463 | "fetch": { |
| 1464 | |
| 1465 | }, |
| 1466 | "commit": { |
| 1467 | "parents": [ |
| 1468 | { |
| 1469 | "commit": "7803f427dd7c4a2441466e4d740a1850dcee1af4", |
| 1470 | "subject": "123" |
| 1471 | } |
| 1472 | ], |
| 1473 | "author": { |
| 1474 | "name": "Nitzan Gur-Furman", |
| 1475 | "email": "nitzan@google.com", |
| 1476 | "date": "2022-11-21 20: 49: 39.000000000", |
| 1477 | "tz": 60 |
| 1478 | }, |
| 1479 | "committer": { |
| 1480 | "name": "Administrator", |
| 1481 | "email": "admin@example.com", |
| 1482 | "date": "2022-11-21 20: 56: 49.000000000", |
| 1483 | "tz": 60 |
| 1484 | }, |
| 1485 | "subject": "456", |
| 1486 | "message": "456\n" |
| 1487 | }, |
| 1488 | "description": "Rebase" |
| 1489 | } |
| 1490 | }, |
| 1491 | "requirements": [ |
| 1492 | |
| 1493 | ], |
| 1494 | "submit_records": [ |
| 1495 | { |
| 1496 | "rule_name": "gerrit~DefaultSubmitRule", |
| 1497 | "status": "NOT_READY", |
| 1498 | "labels": [ |
| 1499 | { |
| 1500 | "label": "Code-Review", |
| 1501 | "status": "NEED" |
| 1502 | } |
| 1503 | ] |
| 1504 | } |
| 1505 | ] |
| 1506 | }, |
| 1507 | { |
| 1508 | "id": "myProject~master~I08a021fb07b83fe845140a2c11508b3bdd93b48f", |
| 1509 | "project": "myProject", |
| 1510 | "branch": "master", |
| 1511 | "hashtags": [ |
| 1512 | |
| 1513 | ], |
| 1514 | "change_id": "I08a021fb07b83fe845140a2c11508b3bdd93b48f", |
| 1515 | "subject": "789", |
| 1516 | "status": "NEW", |
| 1517 | "created": "2022-11-21 20: 51: 31.000000000", |
| 1518 | "updated": "2022-11-21 20: 56: 49.000000000", |
| 1519 | "submit_type": "MERGE_IF_NECESSARY", |
| 1520 | "insertions": 0, |
| 1521 | "deletions": 0, |
| 1522 | "total_comment_count": 0, |
| 1523 | "unresolved_comment_count": 0, |
| 1524 | "has_review_started": true, |
| 1525 | "meta_rev_id": "3bfb843fea471f96e16b9199c3a30fff0285bc45", |
| 1526 | "_number": 22, |
| 1527 | "owner": { |
| 1528 | "_account_id": 1000000 |
| 1529 | }, |
| 1530 | "current_revision": "77eb17a9501a5c21963bc6af56085e60f281acbb", |
| 1531 | "revisions": { |
| 1532 | "77eb17a9501a5c21963bc6af56085e60f281acbb": { |
| 1533 | "kind": "NO_CHANGE", |
| 1534 | "_number": 2, |
| 1535 | "created": "2022-11-21 20: 56: 49.000000000", |
| 1536 | "uploader": { |
| 1537 | "_account_id": 1000000 |
| 1538 | }, |
| 1539 | "ref": "refs/changes/22/22/2", |
| 1540 | "fetch": { |
| 1541 | |
| 1542 | }, |
| 1543 | "commit": { |
| 1544 | "parents": [ |
| 1545 | { |
| 1546 | "commit": "c3b2ba222d42a56e05c90f88d4509a124620517d", |
| 1547 | "subject": "456" |
| 1548 | } |
| 1549 | ], |
| 1550 | "author": { |
| 1551 | "name": "Nitzan Gur-Furman", |
| 1552 | "email": "nitzan@google.com", |
| 1553 | "date": "2022-11-21 20: 51: 07.000000000", |
| 1554 | "tz": 60 |
| 1555 | }, |
| 1556 | "committer": { |
| 1557 | "name": "Administrator", |
| 1558 | "email": "admin@example.com", |
| 1559 | "date": "2022-11-21 20: 56: 49.000000000", |
| 1560 | "tz": 60 |
| 1561 | }, |
| 1562 | "subject": "789", |
| 1563 | "message": "789\n" |
| 1564 | }, |
| 1565 | "description": "Rebase" |
| 1566 | } |
| 1567 | }, |
| 1568 | "requirements": [ |
| 1569 | |
| 1570 | ], |
| 1571 | "submit_records": [ |
| 1572 | { |
| 1573 | "rule_name": "gerrit~DefaultSubmitRule", |
| 1574 | "status": "NOT_READY", |
| 1575 | "labels": [ |
| 1576 | { |
| 1577 | "label": "Code-Review", |
| 1578 | "status": "NEED" |
| 1579 | } |
| 1580 | ] |
| 1581 | } |
| 1582 | ] |
| 1583 | } |
| 1584 | ], |
| 1585 | } |
| 1586 | ---- |
| 1587 | |
| 1588 | If the change cannot be rebased, e.g. due to conflicts, the response is |
| 1589 | "`409 Conflict`" and the error message is contained in the response |
| 1590 | body. |
| 1591 | |
| 1592 | .Response |
| 1593 | ---- |
| 1594 | HTTP/1.1 409 Conflict |
| 1595 | Content-Disposition: attachment |
| 1596 | Content-Type: text/plain; charset=UTF-8 |
| 1597 | |
| 1598 | Change I0e534de9d7f0d6f35b71f7d726acf835b2110c66 could not be rebased due to a conflict during |
| 1599 | merge. |
| 1600 | |
| 1601 | merge conflict(s): |
| 1602 | a.txt |
| 1603 | ---- |
| 1604 | |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 1605 | [[move-change]] |
| 1606 | === Move Change |
| 1607 | -- |
| 1608 | 'POST /changes/link:#change-id[\{change-id\}]/move' |
| 1609 | -- |
| 1610 | |
| 1611 | Move a change. |
| 1612 | |
| 1613 | The destination branch must be provided in the request body inside a |
| 1614 | link:#move-input[MoveInput] entity. |
Marija Savtchouk | cee6a8f | 2020-12-03 12:58:04 +0000 | [diff] [blame] | 1615 | Only veto votes that are blocking the change from submission are moved to |
| 1616 | the destination branch by default. |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 1617 | |
| 1618 | .Request |
| 1619 | ---- |
| 1620 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/move HTTP/1.0 |
| 1621 | Content-Type: application/json; charset=UTF-8 |
| 1622 | |
| 1623 | { |
| 1624 | "destination_branch" : "release-branch" |
| 1625 | } |
| 1626 | |
| 1627 | ---- |
| 1628 | |
| 1629 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1630 | describes the moved change. |
| 1631 | |
| 1632 | .Response |
| 1633 | ---- |
| 1634 | HTTP/1.1 200 OK |
| 1635 | Content-Disposition: attachment |
| 1636 | Content-Type: application/json; charset=UTF-8 |
| 1637 | |
| 1638 | )]}' |
| 1639 | { |
| 1640 | "id": "myProject~release-branch~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1641 | "project": "myProject", |
| 1642 | "branch": "release-branch", |
| 1643 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1644 | "subject": "Implementing Feature X", |
| 1645 | "status": "NEW", |
| 1646 | "created": "2013-02-01 09:59:32.126000000", |
| 1647 | "updated": "2013-02-21 11:16:36.775000000", |
| 1648 | "mergeable": true, |
| 1649 | "insertions": 2, |
| 1650 | "deletions": 13, |
| 1651 | "_number": 3965, |
| 1652 | "owner": { |
| 1653 | "name": "John Doe" |
| 1654 | } |
| 1655 | } |
| 1656 | ---- |
| 1657 | |
Changcheng Xiao | 6dc9042 | 2017-08-09 10:21:58 +0200 | [diff] [blame] | 1658 | Note that this endpoint will not update the change's parents, which is |
| 1659 | different from the link:#cherry-pick[cherry-pick] endpoint. |
| 1660 | |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 1661 | If the change cannot be moved because the change state doesn't |
| 1662 | allow moving the change, the response is "`409 Conflict`" and |
| 1663 | the error message is contained in the response body. |
| 1664 | |
| 1665 | .Response |
| 1666 | ---- |
| 1667 | HTTP/1.1 409 Conflict |
| 1668 | Content-Disposition: attachment |
| 1669 | Content-Type: text/plain; charset=UTF-8 |
| 1670 | |
| 1671 | change is merged |
| 1672 | ---- |
| 1673 | |
| 1674 | If the change cannot be moved because the user doesn't have |
| 1675 | abandon permission on the change or upload permission on the destination, |
| 1676 | the response is "`409 Conflict`" and the error message is contained in the |
| 1677 | response body. |
| 1678 | |
| 1679 | .Response |
| 1680 | ---- |
| 1681 | HTTP/1.1 409 Conflict |
| 1682 | Content-Disposition: attachment |
| 1683 | Content-Type: text/plain; charset=UTF-8 |
| 1684 | |
| 1685 | move not permitted |
| 1686 | ---- |
| 1687 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1688 | [[revert-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1689 | === Revert Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1690 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1691 | 'POST /changes/link:#change-id[\{change-id\}]/revert' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1692 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1693 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1694 | Reverts a change. |
| 1695 | |
Gal Paikin | 006d52b | 2019-12-19 11:22:09 +0100 | [diff] [blame] | 1696 | The subject of the newly created change will be |
| 1697 | 'Revert "<subject-of-reverted-change>"'. If the subject of the change reverted is |
| 1698 | above 63 characters, it will be cut down to 59 characters with "..." in the end. |
| 1699 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1700 | The request body does not need to include a link:#revert-input[ |
| 1701 | RevertInput] entity if no review comment is added. |
| 1702 | |
| 1703 | .Request |
| 1704 | ---- |
Michael Zhou | 1027049 | 2016-03-24 22:35:40 -0400 | [diff] [blame] | 1705 | POST /changes/myProject~master~I1ffe09a505e25f15ce1521bcfb222e51e62c2a14/revert HTTP/1.0 |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1706 | ---- |
| 1707 | |
| 1708 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1709 | describes the reverting change. |
| 1710 | |
| 1711 | .Response |
| 1712 | ---- |
| 1713 | HTTP/1.1 200 OK |
| 1714 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1715 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1716 | |
| 1717 | )]}' |
| 1718 | { |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1719 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1720 | "project": "myProject", |
| 1721 | "branch": "master", |
| 1722 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1723 | "subject": "Revert \"Implementing Feature X\"", |
| 1724 | "status": "NEW", |
| 1725 | "created": "2013-02-01 09:59:32.126000000", |
| 1726 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1727 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 1728 | "insertions": 6, |
| 1729 | "deletions": 4, |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1730 | "_number": 3965, |
| 1731 | "owner": { |
| 1732 | "name": "John Doe" |
| 1733 | } |
| 1734 | } |
| 1735 | ---- |
| 1736 | |
Gal Paikin | 6c9ed95 | 2020-01-22 10:36:35 +0100 | [diff] [blame] | 1737 | If the user doesn't have revert permission on the change or upload permission on |
| 1738 | the destination branch, the response is "`403 Forbidden`", and the error message is |
| 1739 | contained in the response body. |
| 1740 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1741 | If the change cannot be reverted because the change state doesn't |
Gal Paikin | 6c9ed95 | 2020-01-22 10:36:35 +0100 | [diff] [blame] | 1742 | allow reverting the change the response is "`409 Conflict`", and the error |
| 1743 | message is contained in the response body. |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1744 | |
| 1745 | .Response |
| 1746 | ---- |
| 1747 | HTTP/1.1 409 Conflict |
| 1748 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1749 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 1750 | |
| 1751 | change is new |
| 1752 | ---- |
| 1753 | |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 1754 | [[revert-submission]] |
| 1755 | === Revert Submission |
| 1756 | -- |
| 1757 | 'POST /changes/link:#change-id[\{change-id\}]/revert_submission' |
| 1758 | -- |
| 1759 | |
| 1760 | Creates open revert changes for all of the changes of a certain submission. |
| 1761 | |
Gal Paikin | 006d52b | 2019-12-19 11:22:09 +0100 | [diff] [blame] | 1762 | The subject of each revert change will be 'Revert "<subject-of-reverted-change"'. |
Gal Paikin | 100bf60 | 2019-12-23 14:50:41 +0100 | [diff] [blame] | 1763 | If the subject is above 60 characters, the subject will be cut to 56 characters |
| 1764 | with "..." in the end. However, whenever reverting the submission of a revert |
| 1765 | submission, the subject will be shortened from |
| 1766 | 'Revert "Revert "<subject-of-reverted-change""' to |
| 1767 | 'Revert^2 "<subject-of-reverted-change"'. Also, for every future revert submission, |
| 1768 | the only difference in the subject will be the number of the revert (instead of |
| 1769 | Revert^2 the subject will change to Revert^3 and so on). |
| 1770 | There are no guarantees about the subjects if the users change the default subjects. |
Gal Paikin | affd024 | 2019-12-18 18:10:08 +0100 | [diff] [blame] | 1771 | |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 1772 | Details for the revert can be specified in the request body inside a link:#revert-input[ |
| 1773 | RevertInput] The topic of all created revert changes will be |
| 1774 | `revert-{submission_id}-{random_string_of_size_10}`. |
| 1775 | |
| 1776 | The changes will not be rebased on onto the destination branch so the users may still |
| 1777 | have to manually rebase them to resolve conflicts and make them submittable. |
| 1778 | |
Gal Paikin | 653a852 | 2019-11-25 11:40:10 +0100 | [diff] [blame] | 1779 | However, the changes that have the same project and branch will be rebased on top |
| 1780 | of each other. E.g, the first revert change will have the original change as a |
| 1781 | parent, and the second revert change will have the first revert change as a |
| 1782 | parent. |
| 1783 | |
| 1784 | There is one special case that involves merge commits; if a user has multiple |
| 1785 | changes in the same project and branch, but not in the same change series, those |
| 1786 | changes can still get submitted together if they have the same topic and |
| 1787 | link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] in |
| 1788 | gerrit.config is set to true. In the case, Gerrit may create merge commits on |
| 1789 | submit (depending on the link:config-project-config.html#submit-type[submit types] |
| 1790 | of the project). |
| 1791 | The first parent for the reverts will be the most recent merge commit that was |
| 1792 | created by Gerrit to merge the different change series into the target branch. |
| 1793 | |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 1794 | .Request |
| 1795 | ---- |
| 1796 | POST /changes/myProject~master~I1ffe09a505e25f15ce1521bcfb222e51e62c2a14/revert_submission HTTP/1.0 |
| 1797 | ---- |
| 1798 | |
| 1799 | As response link:#revert-submission-info[RevertSubmissionInfo] entity |
| 1800 | is returned. That entity describes the revert changes. |
| 1801 | |
| 1802 | .Response |
| 1803 | ---- |
| 1804 | HTTP/1.1 200 OK |
| 1805 | Content-Disposition: attachment |
| 1806 | Content-Type: application/json; charset=UTF-8 |
| 1807 | |
| 1808 | )]}' |
| 1809 | "revert_changes": |
| 1810 | [ |
| 1811 | { |
| 1812 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1813 | "project": "myProject", |
| 1814 | "branch": "master", |
| 1815 | "topic": "revert--1571043962462-3640749-ABCEEZGHIJ", |
| 1816 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1817 | "subject": "Revert \"Implementing Feature X\"", |
| 1818 | "status": "NEW", |
| 1819 | "created": "2013-02-01 09:59:32.126000000", |
| 1820 | "updated": "2013-02-21 11:16:36.775000000", |
| 1821 | "mergeable": true, |
| 1822 | "insertions": 6, |
| 1823 | "deletions": 4, |
| 1824 | "_number": 3965, |
| 1825 | "owner": { |
| 1826 | "name": "John Doe" |
| 1827 | } |
| 1828 | }, |
| 1829 | { |
| 1830 | "id": "anyProject~master~1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 1831 | "project": "anyProject", |
| 1832 | "branch": "master", |
| 1833 | "topic": "revert--1571043962462-3640749-ABCEEZGHIJ", |
| 1834 | "change_id": "I1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 1835 | "subject": "Revert \"Implementing Feature Y\"", |
| 1836 | "status": "NEW", |
| 1837 | "created": "2013-02-04 09:59:33.126000000", |
| 1838 | "updated": "2013-02-21 11:16:37.775000000", |
| 1839 | "mergeable": true, |
| 1840 | "insertions": 62, |
| 1841 | "deletions": 11, |
| 1842 | "_number": 3966, |
| 1843 | "owner": { |
| 1844 | "name": "Jane Doe" |
| 1845 | } |
| 1846 | } |
| 1847 | ] |
| 1848 | ---- |
| 1849 | |
Gal Paikin | 6c9ed95 | 2020-01-22 10:36:35 +0100 | [diff] [blame] | 1850 | If the user doesn't have revert permission on the change or upload permission on |
| 1851 | the destination, the response is "`403 Forbidden`", and the error message is |
| 1852 | contained in the response body. |
| 1853 | |
| 1854 | If the change cannot be reverted because the change state doesn't |
| 1855 | allow reverting the change the response is "`409 Conflict`", and the error |
| 1856 | message is contained in the response body. |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 1857 | |
| 1858 | .Response |
| 1859 | ---- |
| 1860 | HTTP/1.1 409 Conflict |
| 1861 | Content-Disposition: attachment |
| 1862 | Content-Type: text/plain; charset=UTF-8 |
| 1863 | |
| 1864 | change is new |
| 1865 | ---- |
| 1866 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1867 | [[submit-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1868 | === Submit Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1869 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1870 | 'POST /changes/link:#change-id[\{change-id\}]/submit' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1871 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1872 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1873 | Submits a change. |
| 1874 | |
| 1875 | The request body only needs to include a link:#submit-input[ |
David Pursehouse | a8f48f8 | 2016-03-10 15:27:47 +0900 | [diff] [blame] | 1876 | SubmitInput] entity if submitting on behalf of another user. |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1877 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 1878 | Submitting a change also removes all users from the link:#attention-set[attention set]. |
| 1879 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1880 | .Request |
| 1881 | ---- |
| 1882 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/submit HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1883 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1884 | |
| 1885 | { |
David Pursehouse | a8f48f8 | 2016-03-10 15:27:47 +0900 | [diff] [blame] | 1886 | "on_behalf_of": 1001439 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1887 | } |
| 1888 | ---- |
| 1889 | |
| 1890 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 1891 | describes the submitted/merged change. |
| 1892 | |
Gal Paikin | e2849a8 | 2021-04-19 13:41:10 +0200 | [diff] [blame] | 1893 | Submission may submit multiple changes, but we still only return one ChangeInfo |
| 1894 | object. To query for all submitted changes, please use the submission_id that is |
| 1895 | part of the response. |
| 1896 | |
| 1897 | Changes that will also be submitted: |
| 1898 | 1. All changes of the same topic if |
| 1899 | link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] |
| 1900 | configuration is set to true. |
| 1901 | 2. All dependent changes. |
| 1902 | 3. The closure of the above (e.g if a dependent change has a topic, all changes |
| 1903 | of *that* topic will also be submitted). |
| 1904 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1905 | .Response |
| 1906 | ---- |
| 1907 | HTTP/1.1 200 OK |
| 1908 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1909 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1910 | |
| 1911 | )]}' |
| 1912 | { |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1913 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1914 | "project": "myProject", |
| 1915 | "branch": "master", |
| 1916 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1917 | "subject": "Implementing Feature X", |
| 1918 | "status": "MERGED", |
| 1919 | "created": "2013-02-01 09:59:32.126000000", |
| 1920 | "updated": "2013-02-21 11:16:36.775000000", |
Khai Do | 96a7caf | 2016-01-07 14:07:54 -0800 | [diff] [blame] | 1921 | "submitted": "2013-02-21 11:16:36.615000000", |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1922 | "_number": 3965, |
| 1923 | "owner": { |
| 1924 | "name": "John Doe" |
| 1925 | } |
| 1926 | } |
| 1927 | ---- |
| 1928 | |
| 1929 | If the change cannot be submitted because the submit rule doesn't allow |
| 1930 | submitting the change, the response is "`409 Conflict`" and the error |
| 1931 | message is contained in the response body. |
| 1932 | |
| 1933 | .Response |
| 1934 | ---- |
| 1935 | HTTP/1.1 409 Conflict |
| 1936 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1937 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 1938 | |
| 1939 | blocked by Verified |
| 1940 | ---- |
| 1941 | |
David Pursehouse | 025c1af | 2015-11-20 17:02:50 +0900 | [diff] [blame] | 1942 | [[submitted-together]] |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1943 | === Changes Submitted Together |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1944 | -- |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1945 | '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] | 1946 | -- |
| 1947 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1948 | Computes list of all changes which are submitted when |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1949 | link:#submit-change[Submit] is called for this change, |
Stefan Beller | 460f354 | 2015-07-20 14:10:41 -0700 | [diff] [blame] | 1950 | including the current change itself. |
| 1951 | |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1952 | The list consists of: |
| 1953 | |
| 1954 | * The given change. |
| 1955 | * If link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] |
Gal Paikin | e7a208d | 2021-11-30 12:08:27 +0100 | [diff] [blame] | 1956 | is enabled OR if the `o=TOPIC_CLOSURE` query parameter is passed, include all |
| 1957 | open changes with the same topic. |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1958 | * For each change whose submit type is not CHERRY_PICK, include unmerged |
| 1959 | ancestors targeting the same branch. |
| 1960 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1961 | As a special case, the list is empty if this change would be |
| 1962 | submitted by itself (without other changes). |
| 1963 | |
| 1964 | .Request |
| 1965 | ---- |
| 1966 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/submitted_together?o=NON_VISIBLE_CHANGES HTTP/1.0 |
| 1967 | Content-Type: application/json; charset=UTF-8 |
| 1968 | ---- |
| 1969 | |
| 1970 | As a response a link:#submitted-together-info[SubmittedTogetherInfo] |
| 1971 | entity is returned that describes what would happen if the change were |
| 1972 | submitted. This response contains a list of changes and a count of |
| 1973 | changes that are not visible to the caller that are part of the set of |
| 1974 | changes to be merged. |
| 1975 | |
| 1976 | The listed changes use the same format as in |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 1977 | link:#list-changes[Query Changes] with the |
| 1978 | link:#labels[`LABELS`], link:#detailed-labels[`DETAILED_LABELS`], |
Patrick Hiesel | 6fbbdaa | 2018-04-05 15:10:13 +0200 | [diff] [blame] | 1979 | link:#current-revision[`CURRENT_REVISION`],and |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 1980 | link:#submittable[`SUBMITTABLE`] options set. |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1981 | |
Shawn Pearce | 8080c3d | 2016-09-19 19:15:04 -0700 | [diff] [blame] | 1982 | Standard link:#query-options[formatting options] can be specified |
| 1983 | with the `o` parameter, as well as the `submitted_together` specific |
Gal Paikin | e7a208d | 2021-11-30 12:08:27 +0100 | [diff] [blame] | 1984 | options `NON_VISIBLE_CHANGES` and `TOPIC_CLOSURE`. |
Shawn Pearce | 8080c3d | 2016-09-19 19:15:04 -0700 | [diff] [blame] | 1985 | |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 1986 | .Response |
| 1987 | ---- |
| 1988 | HTTP/1.1 200 OK |
| 1989 | Content-Disposition: attachment |
| 1990 | Content-Type: application/json; charset=UTF-8 |
| 1991 | |
| 1992 | )]}' |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 1993 | { |
| 1994 | "changes": [ |
| 1995 | { |
| 1996 | "id": "gerrit~master~I1ffe09a505e25f15ce1521bcfb222e51e62c2a14", |
| 1997 | "project": "gerrit", |
| 1998 | "branch": "master", |
| 1999 | "hashtags": [], |
| 2000 | "change_id": "I1ffe09a505e25f15ce1521bcfb222e51e62c2a14", |
| 2001 | "subject": "ChangeMergeQueue: Rewrite such that it works on set of changes", |
| 2002 | "status": "NEW", |
| 2003 | "created": "2015-05-01 15:39:57.979000000", |
| 2004 | "updated": "2015-05-20 19:25:21.592000000", |
| 2005 | "mergeable": true, |
| 2006 | "insertions": 303, |
| 2007 | "deletions": 210, |
| 2008 | "_number": 1779, |
| 2009 | "owner": { |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2010 | "_account_id": 1000000 |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2011 | }, |
| 2012 | "labels": { |
| 2013 | "Code-Review": { |
| 2014 | "approved": { |
| 2015 | "_account_id": 1000000 |
| 2016 | }, |
| 2017 | "all": [ |
| 2018 | { |
| 2019 | "value": 2, |
| 2020 | "date": "2015-05-20 19:25:21.592000000", |
| 2021 | "_account_id": 1000000 |
| 2022 | } |
| 2023 | ], |
| 2024 | "values": { |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 2025 | "-2": "This shall not be submitted", |
| 2026 | "-1": "I would prefer this is not submitted as is", |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2027 | " 0": "No score", |
| 2028 | "+1": "Looks good to me, but someone else must approve", |
| 2029 | "+2": "Looks good to me, approved" |
| 2030 | }, |
| 2031 | "default_value": 0 |
| 2032 | }, |
| 2033 | "Verified": { |
| 2034 | "approved": { |
| 2035 | "_account_id": 1000000 |
| 2036 | }, |
| 2037 | "all": [ |
| 2038 | { |
| 2039 | "value": 1, |
| 2040 | "date": "2015-05-20 19:25:21.592000000", |
| 2041 | "_account_id": 1000000 |
| 2042 | } |
| 2043 | ], |
| 2044 | "values": { |
| 2045 | "-1": "Fails", |
| 2046 | " 0": "No score", |
| 2047 | "+1": "Verified" |
| 2048 | }, |
| 2049 | "default_value": 0 |
| 2050 | } |
| 2051 | }, |
| 2052 | "permitted_labels": { |
| 2053 | "Code-Review": [ |
| 2054 | "-2", |
| 2055 | "-1", |
| 2056 | " 0", |
| 2057 | "+1", |
| 2058 | "+2" |
| 2059 | ], |
| 2060 | "Verified": [ |
| 2061 | "-1", |
| 2062 | " 0", |
| 2063 | "+1" |
| 2064 | ] |
| 2065 | }, |
| 2066 | "removable_reviewers": [ |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 2067 | { |
| 2068 | "_account_id": 1000000 |
| 2069 | } |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2070 | ], |
| 2071 | "reviewers": { |
| 2072 | "REVIEWER": [ |
| 2073 | { |
| 2074 | "_account_id": 1000000 |
| 2075 | } |
| 2076 | ] |
| 2077 | }, |
| 2078 | "current_revision": "9adb9f4c7b40eeee0646e235de818d09164d7379", |
| 2079 | "revisions": { |
| 2080 | "9adb9f4c7b40eeee0646e235de818d09164d7379": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 2081 | "kind": "REWORK", |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2082 | "_number": 1, |
| 2083 | "created": "2015-05-01 15:39:57.979000000", |
| 2084 | "uploader": { |
| 2085 | "_account_id": 1000000 |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2086 | }, |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2087 | "ref": "refs/changes/79/1779/1", |
| 2088 | "fetch": {}, |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2089 | } |
| 2090 | } |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2091 | }, |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2092 | { |
| 2093 | "id": "gerrit~master~I7fe807e63792b3d26776fd1422e5e790a5697e22", |
| 2094 | "project": "gerrit", |
| 2095 | "branch": "master", |
| 2096 | "hashtags": [], |
| 2097 | "change_id": "I7fe807e63792b3d26776fd1422e5e790a5697e22", |
| 2098 | "subject": "AbstractSubmoduleSubscription: Split up createSubscription", |
| 2099 | "status": "NEW", |
| 2100 | "created": "2015-05-01 15:39:57.979000000", |
| 2101 | "updated": "2015-05-20 19:25:21.546000000", |
| 2102 | "mergeable": true, |
| 2103 | "insertions": 15, |
| 2104 | "deletions": 6, |
| 2105 | "_number": 1780, |
| 2106 | "owner": { |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2107 | "_account_id": 1000000 |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2108 | }, |
| 2109 | "labels": { |
| 2110 | "Code-Review": { |
| 2111 | "approved": { |
| 2112 | "_account_id": 1000000 |
| 2113 | }, |
| 2114 | "all": [ |
| 2115 | { |
| 2116 | "value": 2, |
| 2117 | "date": "2015-05-20 19:25:21.546000000", |
| 2118 | "_account_id": 1000000 |
| 2119 | } |
| 2120 | ], |
| 2121 | "values": { |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 2122 | "-2": "This shall not be submitted", |
| 2123 | "-1": "I would prefer this is not submitted as is", |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2124 | " 0": "No score", |
| 2125 | "+1": "Looks good to me, but someone else must approve", |
| 2126 | "+2": "Looks good to me, approved" |
| 2127 | }, |
| 2128 | "default_value": 0 |
| 2129 | }, |
| 2130 | "Verified": { |
| 2131 | "approved": { |
| 2132 | "_account_id": 1000000 |
| 2133 | }, |
| 2134 | "all": [ |
| 2135 | { |
| 2136 | "value": 1, |
| 2137 | "date": "2015-05-20 19:25:21.546000000", |
| 2138 | "_account_id": 1000000 |
| 2139 | } |
| 2140 | ], |
| 2141 | "values": { |
| 2142 | "-1": "Fails", |
| 2143 | " 0": "No score", |
| 2144 | "+1": "Verified" |
| 2145 | }, |
| 2146 | "default_value": 0 |
| 2147 | } |
| 2148 | }, |
| 2149 | "permitted_labels": { |
| 2150 | "Code-Review": [ |
| 2151 | "-2", |
| 2152 | "-1", |
| 2153 | " 0", |
| 2154 | "+1", |
| 2155 | "+2" |
| 2156 | ], |
| 2157 | "Verified": [ |
| 2158 | "-1", |
| 2159 | " 0", |
| 2160 | "+1" |
| 2161 | ] |
| 2162 | }, |
| 2163 | "removable_reviewers": [ |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 2164 | { |
| 2165 | "_account_id": 1000000 |
| 2166 | } |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2167 | ], |
| 2168 | "reviewers": { |
| 2169 | "REVIEWER": [ |
| 2170 | { |
| 2171 | "_account_id": 1000000 |
| 2172 | } |
| 2173 | ] |
| 2174 | }, |
| 2175 | "current_revision": "1bd7c12a38854a2c6de426feec28800623f492c4", |
| 2176 | "revisions": { |
| 2177 | "1bd7c12a38854a2c6de426feec28800623f492c4": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 2178 | "kind": "REWORK", |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2179 | "_number": 1, |
| 2180 | "created": "2015-05-01 15:39:57.979000000", |
| 2181 | "uploader": { |
| 2182 | "_account_id": 1000000 |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2183 | }, |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2184 | "ref": "refs/changes/80/1780/1", |
| 2185 | "fetch": {}, |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2186 | } |
| 2187 | } |
| 2188 | } |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2189 | ], |
| 2190 | "non_visible_changes": 0 |
| 2191 | } |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2192 | ---- |
| 2193 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 2194 | If the `o=NON_VISIBLE_CHANGES` query parameter is not passed, then |
| 2195 | instead of a link:#submitted-together-info[SubmittedTogetherInfo] |
| 2196 | entity, the response is a list of changes, or a 403 response with a |
| 2197 | message if the set of changes to be submitted with this change |
| 2198 | includes changes the caller cannot read. |
| 2199 | |
Stefan Beller | a7ad661 | 2015-06-26 10:05:43 -0700 | [diff] [blame] | 2200 | |
Alice Kober-Sotzek | 31c8333 | 2016-10-19 14:23:03 +0200 | [diff] [blame] | 2201 | [[delete-change]] |
| 2202 | === Delete Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2203 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 2204 | 'DELETE /changes/link:#change-id[\{change-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2205 | -- |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 2206 | |
Alice Kober-Sotzek | 31c8333 | 2016-10-19 14:23:03 +0200 | [diff] [blame] | 2207 | Deletes a change. |
| 2208 | |
Paladox none | 580ae0e | 2017-02-12 18:15:48 +0000 | [diff] [blame] | 2209 | New or abandoned changes can be deleted by their owner if the user is granted |
| 2210 | the link:access-control.html#category_delete_own_changes[Delete Own Changes] permission, |
| 2211 | otherwise only by administrators. |
| 2212 | |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 2213 | .Request |
| 2214 | ---- |
| 2215 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2216 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 0d69c23 | 2013-09-10 23:10:23 +0200 | [diff] [blame] | 2217 | ---- |
| 2218 | |
| 2219 | .Response |
| 2220 | ---- |
| 2221 | HTTP/1.1 204 No Content |
| 2222 | ---- |
| 2223 | |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 2224 | [[apply-patch]] |
| 2225 | === Create patch-set from patch |
| 2226 | -- |
| 2227 | 'POST /changes/link:#change-id[\{change-id\}]/patch:apply' |
| 2228 | -- |
| 2229 | |
| 2230 | Creates a new patch set on a destination change from the provided patch. |
| 2231 | |
| 2232 | The patch must be provided in the request body, inside a |
| 2233 | link:#applypatchpatchset-input[ApplyPatchPatchSetInput] entity. |
| 2234 | |
| 2235 | If a base commit is given, the patch is applied on top of it. Otherwise, the |
| 2236 | patch is applied on top of the target change's branch tip. |
| 2237 | |
| 2238 | Applying the patch will fail if the destination change is closed, or in case of any conflicts. |
| 2239 | |
| 2240 | .Request |
| 2241 | ---- |
| 2242 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/patch:apply HTTP/1.0 |
| 2243 | Content-Type: application/json; charset=UTF-8 |
| 2244 | |
| 2245 | { |
| 2246 | "patch": { |
| 2247 | "patch": "new file mode 100644\n--- /dev/null\n+++ b/a_new_file.txt\n@@ -0,0 +1,2 @@ \ |
| 2248 | +Patch compatible `git diff` output \ |
| 2249 | +For example: `link:#get-patch[<gerrit patch>] | base64 -d | sed -z 's/\n/\\n/g'`" |
| 2250 | } |
| 2251 | } |
| 2252 | ---- |
| 2253 | |
| 2254 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 2255 | describes the destination change after applying the patch. |
| 2256 | |
| 2257 | .Response |
| 2258 | ---- |
| 2259 | HTTP/1.1 200 OK |
| 2260 | Content-Disposition: attachment |
| 2261 | Content-Type: application/json; charset=UTF-8 |
| 2262 | |
| 2263 | )]}' |
| 2264 | { |
| 2265 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2266 | "project": "myProject", |
| 2267 | "branch": "release-branch", |
| 2268 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2269 | "subject": "Original change subject", |
| 2270 | "status": "NEW", |
| 2271 | "created": "2013-02-01 09:59:32.126000000", |
| 2272 | "updated": "2013-02-21 11:16:36.775000000", |
| 2273 | "mergeable": true, |
| 2274 | "insertions": 12, |
| 2275 | "deletions": 11, |
| 2276 | "_number": 3965, |
| 2277 | "owner": { |
| 2278 | "name": "John Doe" |
| 2279 | }, |
| 2280 | "current_revision": "184ebe53805e102605d11f6b143486d15c23a09c" |
| 2281 | } |
| 2282 | ---- |
| 2283 | |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 2284 | [[get-included-in]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2285 | === Get Included In |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2286 | -- |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 2287 | 'GET /changes/link:#change-id[\{change-id\}]/in' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2288 | -- |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 2289 | |
| 2290 | Retrieves the branches and tags in which a change is included. As result |
| 2291 | an link:#included-in-info[IncludedInInfo] entity is returned. |
| 2292 | |
| 2293 | .Request |
| 2294 | ---- |
| 2295 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/in HTTP/1.0 |
| 2296 | ---- |
| 2297 | |
| 2298 | .Response |
| 2299 | ---- |
| 2300 | HTTP/1.1 200 OK |
| 2301 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2302 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 2303 | |
| 2304 | )]}' |
| 2305 | { |
David Ostrovsky | 83e8aee | 2013-09-30 22:37:26 +0200 | [diff] [blame] | 2306 | "branches": [ |
| 2307 | "master" |
| 2308 | ], |
| 2309 | "tags": [] |
| 2310 | } |
| 2311 | ---- |
| 2312 | |
David Pursehouse | 4e38b97 | 2014-05-30 10:36:40 +0900 | [diff] [blame] | 2313 | [[index-change]] |
| 2314 | === Index Change |
| 2315 | -- |
| 2316 | 'POST /changes/link:#change-id[\{change-id\}]/index' |
| 2317 | -- |
| 2318 | |
| 2319 | Adds or updates the change in the secondary index. |
| 2320 | |
| 2321 | .Request |
| 2322 | ---- |
| 2323 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/index HTTP/1.0 |
| 2324 | ---- |
| 2325 | |
| 2326 | .Response |
| 2327 | ---- |
| 2328 | HTTP/1.1 204 No Content |
| 2329 | ---- |
| 2330 | |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 2331 | [[list-change-comments]] |
| 2332 | === List Change Comments |
| 2333 | -- |
| 2334 | 'GET /changes/link:#change-id[\{change-id\}]/comments' |
| 2335 | -- |
| 2336 | |
| 2337 | Lists the published comments of all revisions of the change. |
| 2338 | |
| 2339 | Returns a map of file paths to lists of link:#comment-info[CommentInfo] |
| 2340 | entries. The entries in the map are sorted by file path, and the |
| 2341 | comments for each path are sorted by patch set number. Each comment has |
| 2342 | the `patch_set` and `author` fields set. |
| 2343 | |
Youssef Elghareeb | 68e87b6 | 2021-01-11 13:20:03 +0100 | [diff] [blame] | 2344 | If the `enable-context` request parameter is set to true, the comment entries |
Youssef Elghareeb | 5c4fffb | 2020-07-10 19:14:57 +0200 | [diff] [blame] | 2345 | will contain a list of link:#context-line[ContextLine] containing the lines of |
| 2346 | the source file where the comment was written. |
| 2347 | |
Youssef Elghareeb | 87b7450 | 2021-02-05 18:53:05 +0100 | [diff] [blame] | 2348 | The `context-padding` request parameter can be used to specify an extra number |
| 2349 | of context lines to be added before and after the comment range. This parameter |
| 2350 | only works if `enable-context` is set to true. |
| 2351 | |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 2352 | .Request |
| 2353 | ---- |
| 2354 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/comments HTTP/1.0 |
| 2355 | ---- |
| 2356 | |
| 2357 | .Response |
| 2358 | ---- |
| 2359 | HTTP/1.1 200 OK |
| 2360 | Content-Disposition: attachment |
| 2361 | Content-Type: application/json; charset=UTF-8 |
| 2362 | |
| 2363 | )]}' |
| 2364 | { |
| 2365 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 2366 | { |
| 2367 | "patch_set": 1, |
| 2368 | "id": "TvcXrmjM", |
| 2369 | "line": 23, |
| 2370 | "message": "[nit] trailing whitespace", |
| 2371 | "updated": "2013-02-26 15:40:43.986000000" |
| 2372 | "author": { |
| 2373 | "_account_id": 1000096, |
| 2374 | "name": "John Doe", |
| 2375 | "email": "john.doe@example.com" |
| 2376 | } |
| 2377 | }, |
| 2378 | { |
| 2379 | "patch_set": 2, |
| 2380 | "id": "TveXwFiA", |
| 2381 | "line": 49, |
| 2382 | "in_reply_to": "TfYX-Iuo", |
| 2383 | "message": "Done", |
| 2384 | "updated": "2013-02-26 15:40:45.328000000" |
| 2385 | "author": { |
| 2386 | "_account_id": 1000097, |
| 2387 | "name": "Jane Roe", |
| 2388 | "email": "jane.roe@example.com" |
| 2389 | } |
| 2390 | } |
| 2391 | ] |
| 2392 | } |
| 2393 | ---- |
| 2394 | |
Changcheng Xiao | 9b04c04 | 2016-12-28 12:45:29 +0100 | [diff] [blame] | 2395 | [[list-change-robot-comments]] |
| 2396 | === List Change Robot Comments |
| 2397 | -- |
| 2398 | 'GET /changes/link:#change-id[\{change-id\}]/robotcomments' |
| 2399 | -- |
| 2400 | |
| 2401 | Lists the robot comments of all revisions of the change. |
| 2402 | |
| 2403 | Return a map that maps the file path to a list of |
| 2404 | link:#robot-comment-info[RobotCommentInfo] entries. The entries in the |
| 2405 | map are sorted by file path. |
| 2406 | |
| 2407 | .Request |
| 2408 | ---- |
| 2409 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/robotcomments/ HTTP/1.0 |
| 2410 | ---- |
| 2411 | |
| 2412 | .Response |
| 2413 | ---- |
| 2414 | HTTP/1.1 200 OK |
| 2415 | Content-Disposition: attachment |
| 2416 | Content-Type: application/json; charset=UTF-8 |
| 2417 | |
| 2418 | )]}' |
| 2419 | { |
| 2420 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 2421 | { |
| 2422 | "id": "TvcXrmjM", |
| 2423 | "line": 23, |
| 2424 | "message": "unused import", |
| 2425 | "updated": "2016-02-26 15:40:43.986000000", |
| 2426 | "author": { |
| 2427 | "_account_id": 1000110, |
| 2428 | "name": "Code Analyzer", |
| 2429 | "email": "code.analyzer@example.com" |
| 2430 | }, |
David Pursehouse | b23a5ae | 2020-01-27 13:53:11 +0900 | [diff] [blame] | 2431 | "robot_id": "importChecker", |
| 2432 | "robot_run_id": "76b1375aa8626ea7149792831fe2ed85e80d9e04" |
Changcheng Xiao | 9b04c04 | 2016-12-28 12:45:29 +0100 | [diff] [blame] | 2433 | }, |
| 2434 | { |
| 2435 | "id": "TveXwFiA", |
| 2436 | "line": 49, |
| 2437 | "message": "wrong indention", |
| 2438 | "updated": "2016-02-26 15:40:45.328000000", |
| 2439 | "author": { |
| 2440 | "_account_id": 1000110, |
| 2441 | "name": "Code Analyzer", |
| 2442 | "email": "code.analyzer@example.com" |
| 2443 | }, |
David Pursehouse | b23a5ae | 2020-01-27 13:53:11 +0900 | [diff] [blame] | 2444 | "robot_id": "styleChecker", |
| 2445 | "robot_run_id": "5c606c425dd45184484f9d0a2ffd725a7607839b" |
Changcheng Xiao | 9b04c04 | 2016-12-28 12:45:29 +0100 | [diff] [blame] | 2446 | } |
| 2447 | ] |
| 2448 | } |
| 2449 | ---- |
| 2450 | |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 2451 | [[list-change-drafts]] |
| 2452 | === List Change Drafts |
| 2453 | -- |
| 2454 | 'GET /changes/link:#change-id[\{change-id\}]/drafts' |
| 2455 | -- |
| 2456 | |
| 2457 | Lists the draft comments of all revisions of the change that belong to |
| 2458 | the calling user. |
| 2459 | |
| 2460 | Returns a map of file paths to lists of link:#comment-info[CommentInfo] |
| 2461 | entries. The entries in the map are sorted by file path, and the |
| 2462 | comments for each path are sorted by patch set number. Each comment has |
| 2463 | the `patch_set` field set, and no `author`. |
| 2464 | |
Youssef Elghareeb | 59580cb | 2021-03-17 15:02:49 +0100 | [diff] [blame] | 2465 | The `enable-context` and `context-padding` request parameters can be used to |
| 2466 | request comment context. See link:#list-change-comments[List Change Comments] |
| 2467 | for more details. |
| 2468 | |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 2469 | .Request |
| 2470 | ---- |
| 2471 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/drafts HTTP/1.0 |
| 2472 | ---- |
| 2473 | |
| 2474 | .Response |
| 2475 | ---- |
| 2476 | HTTP/1.1 200 OK |
| 2477 | Content-Disposition: attachment |
| 2478 | Content-Type: application/json; charset=UTF-8 |
| 2479 | |
| 2480 | )]}' |
| 2481 | { |
| 2482 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 2483 | { |
| 2484 | "patch_set": 1, |
| 2485 | "id": "TvcXrmjM", |
| 2486 | "line": 23, |
| 2487 | "message": "[nit] trailing whitespace", |
| 2488 | "updated": "2013-02-26 15:40:43.986000000" |
| 2489 | }, |
| 2490 | { |
| 2491 | "patch_set": 2, |
| 2492 | "id": "TveXwFiA", |
| 2493 | "line": 49, |
| 2494 | "in_reply_to": "TfYX-Iuo", |
| 2495 | "message": "Done", |
| 2496 | "updated": "2013-02-26 15:40:45.328000000" |
| 2497 | } |
| 2498 | ] |
| 2499 | } |
| 2500 | ---- |
| 2501 | |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 2502 | [[check-change]] |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 2503 | === Check Change |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 2504 | -- |
| 2505 | 'GET /changes/link:#change-id[\{change-id\}]/check' |
| 2506 | -- |
| 2507 | |
| 2508 | Performs consistency checks on the change, and returns a |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 2509 | link:#change-info[ChangeInfo] entity with the `problems` field set to a |
| 2510 | list of link:#problem-info[ProblemInfo] entities. |
| 2511 | |
| 2512 | Depending on the type of problem, some fields not marked optional may be |
| 2513 | missing from the result. At least `id`, `project`, `branch`, and |
| 2514 | `_number` will be present. |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 2515 | |
| 2516 | .Request |
| 2517 | ---- |
| 2518 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/check HTTP/1.0 |
| 2519 | ---- |
| 2520 | |
| 2521 | .Response |
| 2522 | ---- |
| 2523 | HTTP/1.1 200 OK |
| 2524 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2525 | Content-Type: application/json; charset=UTF-8 |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 2526 | |
| 2527 | )]}' |
| 2528 | { |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 2529 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2530 | "project": "myProject", |
| 2531 | "branch": "master", |
| 2532 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2533 | "subject": "Implementing Feature X", |
| 2534 | "status": "NEW", |
| 2535 | "created": "2013-02-01 09:59:32.126000000", |
| 2536 | "updated": "2013-02-21 11:16:36.775000000", |
| 2537 | "mergeable": true, |
| 2538 | "insertions": 34, |
| 2539 | "deletions": 101, |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 2540 | "_number": 3965, |
| 2541 | "owner": { |
| 2542 | "name": "John Doe" |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 2543 | }, |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 2544 | "problems": [ |
| 2545 | { |
| 2546 | "message": "Current patch set 1 not found" |
| 2547 | } |
Dave Borowitz | fd508ca | 2014-11-06 15:24:04 -0800 | [diff] [blame] | 2548 | ] |
| 2549 | } |
| 2550 | ---- |
| 2551 | |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2552 | [[fix-change]] |
David Pursehouse | aa1f77a | 2016-09-09 14:00:53 +0900 | [diff] [blame] | 2553 | === Fix Change |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2554 | -- |
| 2555 | 'POST /changes/link:#change-id[\{change-id\}]/check' |
| 2556 | -- |
| 2557 | |
| 2558 | Performs consistency checks on the change as with link:#check-change[GET |
| 2559 | /check], and additionally fixes any problems that can be fixed |
| 2560 | automatically. The returned field values reflect any fixes. |
| 2561 | |
Dave Borowitz | bad53ee | 2015-06-11 10:10:18 -0400 | [diff] [blame] | 2562 | Some fixes have options controlling their behavior, which can be set in the |
| 2563 | link:#fix-input[FixInput] entity body. |
| 2564 | |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2565 | Only the change owner, a project owner, or an administrator may fix changes. |
| 2566 | |
| 2567 | .Request |
| 2568 | ---- |
| 2569 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/check HTTP/1.0 |
| 2570 | ---- |
| 2571 | |
| 2572 | .Response |
| 2573 | ---- |
| 2574 | HTTP/1.1 200 OK |
| 2575 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2576 | Content-Type: application/json; charset=UTF-8 |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2577 | |
| 2578 | )]}' |
| 2579 | { |
| 2580 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2581 | "project": "myProject", |
| 2582 | "branch": "master", |
| 2583 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 2584 | "subject": "Implementing Feature X", |
| 2585 | "status": "MERGED", |
| 2586 | "created": "2013-02-01 09:59:32.126000000", |
| 2587 | "updated": "2013-02-21 11:16:36.775000000", |
Khai Do | 96a7caf | 2016-01-07 14:07:54 -0800 | [diff] [blame] | 2588 | "submitted": "2013-02-21 11:16:36.615000000", |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2589 | "mergeable": true, |
| 2590 | "insertions": 34, |
| 2591 | "deletions": 101, |
Dave Borowitz | 3be39d0 | 2014-12-03 17:57:38 -0800 | [diff] [blame] | 2592 | "_number": 3965, |
| 2593 | "owner": { |
| 2594 | "name": "John Doe" |
| 2595 | }, |
| 2596 | "problems": [ |
| 2597 | { |
| 2598 | "message": "Current patch set 2 not found" |
| 2599 | }, |
| 2600 | { |
| 2601 | "message": "Patch set 1 (1eee2c9d8f352483781e772f35dc586a69ff5646) is merged into destination ref master (1eee2c9d8f352483781e772f35dc586a69ff5646), but change status is NEW", |
| 2602 | "status": FIXED, |
| 2603 | "outcome": "Marked change as merged" |
| 2604 | } |
| 2605 | ] |
| 2606 | } |
| 2607 | ---- |
| 2608 | |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 2609 | [[set-work-in-pogress]] |
Aaron Gable | ce92bdd | 2017-06-28 15:36:32 -0700 | [diff] [blame] | 2610 | === Set Work-In-Progress |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 2611 | -- |
| 2612 | 'POST /changes/link:#change-id[\{change-id\}]/wip' |
| 2613 | -- |
| 2614 | |
David Ostrovsky | 4424245 | 2018-06-09 20:25:13 +0200 | [diff] [blame] | 2615 | Marks the change as not ready for review yet. Changes may only be marked not |
| 2616 | ready by the owner, project owners or site administrators. |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 2617 | |
| 2618 | The request body does not need to include a |
| 2619 | link:#work-in-progress-input[WorkInProgressInput] entity if no review comment |
| 2620 | is added. Actions that create a new patch set in a WIP change default to |
| 2621 | notifying *OWNER* instead of *ALL*. |
| 2622 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 2623 | Marking a change work in progress also removes all users from the |
| 2624 | link:#attention-set[attention set]. |
| 2625 | |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 2626 | .Request |
| 2627 | ---- |
| 2628 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/wip HTTP/1.0 |
| 2629 | Content-Type: application/json; charset=UTF-8 |
| 2630 | |
| 2631 | { |
| 2632 | "message": "Refactoring needs to be done before we can proceed here." |
| 2633 | } |
| 2634 | ---- |
| 2635 | |
| 2636 | .Response |
| 2637 | ---- |
| 2638 | HTTP/1.1 200 OK |
| 2639 | ---- |
| 2640 | |
| 2641 | [[set-ready-for-review]] |
Aaron Gable | ce92bdd | 2017-06-28 15:36:32 -0700 | [diff] [blame] | 2642 | === Set Ready-For-Review |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 2643 | -- |
| 2644 | 'POST /changes/link:#change-id[\{change-id\}]/ready' |
| 2645 | -- |
| 2646 | |
David Ostrovsky | 4424245 | 2018-06-09 20:25:13 +0200 | [diff] [blame] | 2647 | Marks the change as ready for review (set WIP property to false). Changes may |
| 2648 | only be marked ready by the owner, project owners or site administrators. |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 2649 | |
| 2650 | Activates notifications of reviewer. The request body does not need |
| 2651 | to include a link:#work-in-progress-input[WorkInProgressInput] entity |
| 2652 | if no review comment is added. |
| 2653 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 2654 | Marking a change ready for review also adds all of the reviewers of the change |
| 2655 | to the link:#attention-set[attention set]. |
| 2656 | |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 2657 | .Request |
| 2658 | ---- |
| 2659 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/ready HTTP/1.0 |
| 2660 | Content-Type: application/json;charset=UTF-8 |
| 2661 | |
| 2662 | { |
| 2663 | "message": "Refactoring is done." |
| 2664 | } |
| 2665 | |
| 2666 | ---- |
| 2667 | |
| 2668 | .Response |
| 2669 | ---- |
| 2670 | HTTP/1.1 200 OK |
| 2671 | ---- |
| 2672 | |
David Pursehouse | 7c5c3a5 | 2017-04-10 11:37:23 +0900 | [diff] [blame] | 2673 | [[mark-private]] |
Edwin Kempin | 98ddc8a | 2017-02-21 11:56:08 +0100 | [diff] [blame] | 2674 | === Mark Private |
| 2675 | -- |
Edwin Kempin | 364a86b | 2017-04-27 12:34:00 +0200 | [diff] [blame] | 2676 | 'POST /changes/link:#change-id[\{change-id\}]/private' |
Edwin Kempin | 98ddc8a | 2017-02-21 11:56:08 +0100 | [diff] [blame] | 2677 | -- |
| 2678 | |
Patrick Hiesel | 707e61a | 2019-02-13 18:28:48 +0100 | [diff] [blame] | 2679 | Marks the change to be private. Only open changes can be marked private. |
| 2680 | Changes may only be marked private by the owner or site administrators. |
Edwin Kempin | 98ddc8a | 2017-02-21 11:56:08 +0100 | [diff] [blame] | 2681 | |
Edwin Kempin | 364a86b | 2017-04-27 12:34:00 +0200 | [diff] [blame] | 2682 | A message can be specified in the request body inside a |
| 2683 | link:#private-input[PrivateInput] entity. |
| 2684 | |
Edwin Kempin | 98ddc8a | 2017-02-21 11:56:08 +0100 | [diff] [blame] | 2685 | .Request |
| 2686 | ---- |
Edwin Kempin | 364a86b | 2017-04-27 12:34:00 +0200 | [diff] [blame] | 2687 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/private HTTP/1.0 |
| 2688 | Content-Type: application/json; charset=UTF-8 |
| 2689 | |
| 2690 | { |
| 2691 | "message": "After this security fix has been released we can make it public now." |
| 2692 | } |
Edwin Kempin | 98ddc8a | 2017-02-21 11:56:08 +0100 | [diff] [blame] | 2693 | ---- |
| 2694 | |
| 2695 | .Response |
| 2696 | ---- |
| 2697 | HTTP/1.1 201 Created |
| 2698 | ---- |
| 2699 | |
| 2700 | If the change was already private the response is "`200 OK`". |
| 2701 | |
| 2702 | [[unmark-private]] |
| 2703 | === Unmark Private |
| 2704 | -- |
| 2705 | 'DELETE /changes/link:#change-id[\{change-id\}]/private' |
| 2706 | -- |
| 2707 | |
| 2708 | Marks the change to be non-private. Note users can only unmark own private |
| 2709 | changes. |
| 2710 | |
| 2711 | .Request |
| 2712 | ---- |
| 2713 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/private HTTP/1.0 |
| 2714 | ---- |
| 2715 | |
| 2716 | .Response |
| 2717 | ---- |
| 2718 | HTTP/1.1 204 No Content |
| 2719 | ---- |
| 2720 | |
| 2721 | If the change was already not private, the response is "`409 Conflict`". |
| 2722 | |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 2723 | A message can be specified in the request body inside a |
| 2724 | link:#private-input[PrivateInput] entity. Historically, this method allowed |
| 2725 | a body in the DELETE, but that behavior is |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 2726 | link:https://www.gerritcodereview.com/releases/2.16.md[deprecated,role=external,window=_blank]. |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 2727 | In this case, use a POST request instead: |
Edwin Kempin | 364a86b | 2017-04-27 12:34:00 +0200 | [diff] [blame] | 2728 | |
| 2729 | .Request |
| 2730 | ---- |
| 2731 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/private.delete HTTP/1.0 |
| 2732 | Content-Type: application/json; charset=UTF-8 |
| 2733 | |
| 2734 | { |
| 2735 | "message": "This is a security fix that must not be public." |
| 2736 | } |
| 2737 | ---- |
| 2738 | |
David Pursehouse | 7c79b68 | 2017-08-25 13:18:32 +0900 | [diff] [blame] | 2739 | [[get-hashtags]] |
| 2740 | === Get Hashtags |
| 2741 | -- |
| 2742 | 'GET /changes/link:#change-id[\{change-id\}]/hashtags' |
| 2743 | -- |
| 2744 | |
| 2745 | Gets the hashtags associated with a change. |
| 2746 | |
David Pursehouse | 7c79b68 | 2017-08-25 13:18:32 +0900 | [diff] [blame] | 2747 | .Request |
| 2748 | ---- |
| 2749 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/hashtags HTTP/1.0 |
| 2750 | ---- |
| 2751 | |
| 2752 | As response the change's hashtags are returned as a list of strings. |
| 2753 | |
| 2754 | .Response |
| 2755 | ---- |
| 2756 | HTTP/1.1 200 OK |
| 2757 | Content-Disposition: attachment |
| 2758 | Content-Type: application/json; charset=UTF-8 |
| 2759 | |
| 2760 | )]}' |
| 2761 | [ |
| 2762 | "hashtag1", |
| 2763 | "hashtag2" |
| 2764 | ] |
| 2765 | ---- |
| 2766 | |
| 2767 | [[set-hashtags]] |
| 2768 | === Set Hashtags |
| 2769 | -- |
| 2770 | 'POST /changes/link:#change-id[\{change-id\}]/hashtags' |
| 2771 | -- |
| 2772 | |
| 2773 | Adds and/or removes hashtags from a change. |
| 2774 | |
David Pursehouse | 7c79b68 | 2017-08-25 13:18:32 +0900 | [diff] [blame] | 2775 | The hashtags to add or remove must be provided in the request body inside a |
| 2776 | link:#hashtags-input[HashtagsInput] entity. |
| 2777 | |
| 2778 | .Request |
| 2779 | ---- |
| 2780 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/hashtags HTTP/1.0 |
| 2781 | Content-Type: application/json; charset=UTF-8 |
| 2782 | |
| 2783 | { |
| 2784 | "add" : [ |
| 2785 | "hashtag3" |
| 2786 | ], |
| 2787 | "remove" : [ |
| 2788 | "hashtag2" |
| 2789 | ] |
| 2790 | } |
| 2791 | ---- |
| 2792 | |
| 2793 | As response the change's hashtags are returned as a list of strings. |
| 2794 | |
| 2795 | .Response |
| 2796 | ---- |
| 2797 | HTTP/1.1 200 OK |
| 2798 | Content-Disposition: attachment |
| 2799 | Content-Type: application/json; charset=UTF-8 |
| 2800 | |
| 2801 | )]}' |
| 2802 | [ |
| 2803 | "hashtag1", |
| 2804 | "hashtag3" |
| 2805 | ] |
| 2806 | ---- |
| 2807 | |
Changcheng Xiao | 7fb7329 | 2018-04-25 11:43:19 +0200 | [diff] [blame] | 2808 | [[list-change-messages]] |
| 2809 | === List Change Messages |
| 2810 | -- |
| 2811 | 'GET /changes/link:#change-id[\{change-id\}]/messages' |
| 2812 | -- |
| 2813 | |
| 2814 | Lists all the messages of a change including link:#detailed-accounts[detailed account information]. |
| 2815 | |
| 2816 | .Request |
| 2817 | ---- |
| 2818 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/messages |
| 2819 | ---- |
| 2820 | |
| 2821 | As response a list of link:#change-message-info[ChangeMessageInfo] entities is returned. |
| 2822 | |
| 2823 | .Response |
| 2824 | ---- |
| 2825 | HTTP/1.1 200 OK |
| 2826 | Content-Disposition: attachment |
| 2827 | Content-Type: application/json; charset=UTF-8 |
| 2828 | |
| 2829 | )]}' |
| 2830 | [ |
| 2831 | { |
| 2832 | "id": "YH-egE", |
| 2833 | "author": { |
| 2834 | "_account_id": 1000096, |
| 2835 | "name": "John Doe", |
| 2836 | "email": "john.doe@example.com", |
| 2837 | "username": "jdoe" |
| 2838 | }, |
| 2839 | "date": "2013-03-23 21:34:02.419000000", |
| 2840 | "message": "Patch Set 1:\n\nThis is the first message.", |
| 2841 | "_revision_number": 1 |
| 2842 | }, |
| 2843 | { |
| 2844 | "id": "WEEdhU", |
| 2845 | "author": { |
| 2846 | "_account_id": 1000097, |
| 2847 | "name": "Jane Roe", |
| 2848 | "email": "jane.roe@example.com", |
| 2849 | "username": "jroe" |
| 2850 | }, |
| 2851 | "date": "2013-03-23 21:36:52.332000000", |
| 2852 | "message": "Patch Set 1:\n\nThis is the second message.\n\nWith a line break.", |
| 2853 | "_revision_number": 1 |
| 2854 | } |
| 2855 | ] |
| 2856 | ---- |
David Pursehouse | c32050d | 2017-08-25 16:27:47 +0900 | [diff] [blame] | 2857 | |
Changcheng Xiao | d61590f | 2018-04-30 10:59:14 +0200 | [diff] [blame] | 2858 | [[get-change-message]] |
| 2859 | === Get Change Message |
| 2860 | |
| 2861 | Retrieves a change message including link:#detailed-accounts[detailed account information]. |
| 2862 | |
| 2863 | -- |
Jonathan Nieder | 58c07cf | 2019-03-26 18:52:22 -0700 | [diff] [blame] | 2864 | 'GET /changes/link:#change-id[\{change-id\}]/messages/link:#change-message-id[\{change-message-id\}]' |
Changcheng Xiao | d61590f | 2018-04-30 10:59:14 +0200 | [diff] [blame] | 2865 | -- |
| 2866 | |
| 2867 | As response a link:#change-message-info[ChangeMessageInfo] entity is returned. |
| 2868 | |
| 2869 | .Response |
| 2870 | ---- |
| 2871 | HTTP/1.1 200 OK |
| 2872 | Content-Disposition: attachment |
| 2873 | Content-Type: application/json; charset=UTF-8 |
| 2874 | |
| 2875 | )]}' |
| 2876 | { |
| 2877 | "id": "aaee04dcb46bafc8be24d8aa70b3b1beb7df5780", |
| 2878 | "author": { |
| 2879 | "_account_id": 1000096, |
| 2880 | "name": "John Doe", |
| 2881 | "email": "john.doe@example.com", |
| 2882 | "username": "jdoe" |
| 2883 | }, |
| 2884 | "date": "2013-03-23 21:34:02.419000000", |
Changcheng Xiao | 6d4ee64 | 2018-04-25 11:43:19 +0200 | [diff] [blame] | 2885 | "message": "a change message", |
| 2886 | "_revision_number": 1 |
| 2887 | } |
| 2888 | ---- |
| 2889 | |
| 2890 | [[delete-change-message]] |
| 2891 | === Delete Change Message |
| 2892 | -- |
Jonathan Nieder | 58c07cf | 2019-03-26 18:52:22 -0700 | [diff] [blame] | 2893 | 'DELETE /changes/link:#change-id[\{change-id\}]/messages/link:#change-message-id[\{change-message-id\}]' + |
| 2894 | 'POST /changes/link:#change-id[\{change-id\}]/messages/link:#change-message-id[\{change-message-id\}]/delete' |
Changcheng Xiao | 6d4ee64 | 2018-04-25 11:43:19 +0200 | [diff] [blame] | 2895 | -- |
| 2896 | |
| 2897 | Deletes a change message by replacing the change message with a new message, |
| 2898 | which contains the name of the user who deleted the change message and the |
| 2899 | reason why it was deleted. The reason can be provided in the request body as a |
| 2900 | link:#delete-change-message-input[DeleteChangeMessageInput] entity. |
| 2901 | |
| 2902 | Note that only users with the |
| 2903 | link:access-control.html#capability_administrateServer[Administrate Server] |
| 2904 | global capability are permitted to delete a change message. |
| 2905 | |
| 2906 | To delete a change message, send a DELETE request: |
| 2907 | |
| 2908 | .Request |
| 2909 | ---- |
Jonathan Nieder | 58c07cf | 2019-03-26 18:52:22 -0700 | [diff] [blame] | 2910 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/messages/aaee04dcb46bafc8be24d8aa70b3b1beb7df5780 HTTP/1.0 |
Changcheng Xiao | 6d4ee64 | 2018-04-25 11:43:19 +0200 | [diff] [blame] | 2911 | ---- |
| 2912 | |
| 2913 | To provide a reason for the deletion, use a POST request: |
| 2914 | |
| 2915 | .Request |
| 2916 | ---- |
Jonathan Nieder | 58c07cf | 2019-03-26 18:52:22 -0700 | [diff] [blame] | 2917 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/messages/aaee04dcb46bafc8be24d8aa70b3b1beb7df5780/delete HTTP/1.0 |
Changcheng Xiao | 6d4ee64 | 2018-04-25 11:43:19 +0200 | [diff] [blame] | 2918 | Content-Type: application/json; charset=UTF-8 |
| 2919 | |
| 2920 | { |
| 2921 | "reason": "spam" |
| 2922 | } |
| 2923 | ---- |
| 2924 | |
| 2925 | As response a link:#change-message-info[ChangeMessageInfo] entity is returned that |
| 2926 | describes the updated change message. |
| 2927 | |
| 2928 | .Response |
| 2929 | ---- |
| 2930 | HTTP/1.1 200 OK |
| 2931 | Content-Disposition: attachment |
| 2932 | Content-Type: application/json; charset=UTF-8 |
| 2933 | |
| 2934 | )]}' |
| 2935 | { |
| 2936 | "id": "aaee04dcb46bafc8be24d8aa70b3b1beb7df5780", |
| 2937 | "author": { |
| 2938 | "_account_id": 1000096, |
| 2939 | "name": "John Doe", |
| 2940 | "email": "john.doe@example.com", |
| 2941 | "username": "jdoe" |
| 2942 | }, |
| 2943 | "date": "2013-03-23 21:34:02.419000000", |
| 2944 | "message": "Change message removed by: Administrator\nReason: spam", |
Changcheng Xiao | d61590f | 2018-04-30 10:59:14 +0200 | [diff] [blame] | 2945 | "_revision_number": 1 |
| 2946 | } |
| 2947 | ---- |
Gustaf Lundh | e8647c6 | 2017-04-28 06:51:26 +0200 | [diff] [blame] | 2948 | |
Youssef Elghareeb | d598693 | 2021-10-15 11:45:23 +0200 | [diff] [blame] | 2949 | [[check-submit-requirement]] |
| 2950 | === Check Submit Requirement |
| 2951 | -- |
| 2952 | 'POST /changes/link:#change-id[\{change-id\}]/check.submit_requirement' |
| 2953 | -- |
| 2954 | |
| 2955 | Tests a submit requirement and returns the result as a |
Youssef Elghareeb | 1a24df6 | 2022-06-24 17:52:28 +0200 | [diff] [blame] | 2956 | link:#submit-requirement-result-info[SubmitRequirementResultInfo]. |
| 2957 | |
| 2958 | The submit requirement can be specified in one of the following ways: |
| 2959 | |
| 2960 | * In the request body as a link:#submit-requirement-input[SubmitRequirementInput]. |
| 2961 | * By passing the two request parameters `sr-name` and |
| 2962 | `refs-config-change-id`. The submit requirement will then be loaded from |
| 2963 | the project config pointed to by the latest patchset of this change ID. |
| 2964 | The `sr-name` should point to an existing submit-requirement and the |
| 2965 | `refs-config-change-id` must be a valid change identifier for a change in the |
| 2966 | refs/meta/config branch, otherwise the request would fail with |
| 2967 | `400 Bad Request`. |
Youssef Elghareeb | d598693 | 2021-10-15 11:45:23 +0200 | [diff] [blame] | 2968 | |
| 2969 | Note that this endpoint does not modify the change resource. |
| 2970 | |
| 2971 | .Request |
| 2972 | ---- |
| 2973 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/check.submit_requirement HTTP/1.0 |
| 2974 | Content-Type: application/json; charset=UTF-8 |
| 2975 | |
| 2976 | { |
| 2977 | "name": "Code-Review", |
| 2978 | "submittability_expression": "label:Code-Review=+2" |
| 2979 | } |
| 2980 | ---- |
| 2981 | |
| 2982 | As response a link:#submit-requirement-result-info[SubmitRequirementResultInfo] |
| 2983 | entity is returned that describes the submit requirement result. |
| 2984 | |
| 2985 | .Response |
| 2986 | ---- |
| 2987 | HTTP/1.1 200 OK |
| 2988 | Content-Disposition: attachment |
| 2989 | Content-Type: application/json; charset=UTF-8 |
| 2990 | |
| 2991 | )]}' |
| 2992 | { |
| 2993 | "name": "Code-Review", |
| 2994 | "status": "SATISFIED", |
| 2995 | "submittability_expression_result": { |
| 2996 | "expression": "label:Code-Review=+2", |
| 2997 | "fulfilled": true, |
| 2998 | "passingAtoms": [ |
| 2999 | "label:Code-Review=+2" |
| 3000 | ] |
| 3001 | }, |
| 3002 | "is_legacy": false |
| 3003 | } |
| 3004 | ---- |
| 3005 | |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3006 | [[edit-endpoints]] |
| 3007 | == Change Edit Endpoints |
| 3008 | |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3009 | [[get-edit-detail]] |
| 3010 | === Get Change Edit Details |
| 3011 | -- |
| 3012 | 'GET /changes/link:#change-id[\{change-id\}]/edit |
| 3013 | -- |
| 3014 | |
| 3015 | Retrieves a change edit details. |
| 3016 | |
| 3017 | .Request |
| 3018 | ---- |
| 3019 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
| 3020 | ---- |
| 3021 | |
| 3022 | As response an link:#edit-info[EditInfo] entity is returned that |
| 3023 | describes the change edit, or "`204 No Content`" when change edit doesn't |
| 3024 | exist for this change. Change edits are stored on special branches and there |
| 3025 | 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] | 3026 | When request parameter `list` is provided the response also includes the file |
| 3027 | list. When `base` request parameter is provided the file list is computed |
David Ostrovsky | 5562fe5 | 2014-08-12 22:36:27 +0200 | [diff] [blame] | 3028 | against this base revision. When request parameter `download-commands` is |
| 3029 | provided fetch info map is also included. |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3030 | |
| 3031 | .Response |
| 3032 | ---- |
| 3033 | HTTP/1.1 200 OK |
| 3034 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3035 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3036 | |
| 3037 | )]}' |
| 3038 | { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 3039 | "commit": { |
| 3040 | "parents": [ |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3041 | { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 3042 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3043 | } |
| 3044 | ], |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 3045 | "author": { |
| 3046 | "name": "Shawn O. Pearce", |
| 3047 | "email": "sop@google.com", |
| 3048 | "date": "2012-04-24 18:08:08.000000000", |
| 3049 | "tz": -420 |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3050 | }, |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 3051 | "committer": { |
| 3052 | "name": "Shawn O. Pearce", |
| 3053 | "email": "sop@google.com", |
| 3054 | "date": "2012-04-24 18:08:08.000000000", |
| 3055 | "tz": -420 |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3056 | }, |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 3057 | "subject": "Use an EventBus to manage star icons", |
| 3058 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3059 | }, |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 3060 | "base_patch_set_number": 1, |
| 3061 | "base_revision": "c35558e0925e6985c91f3a16921537d5e572b7a3", |
| 3062 | "ref": "refs/users/01/1000001/edit-76482/1" |
David Ostrovsky | 1a49f62 | 2014-07-29 00:40:02 +0200 | [diff] [blame] | 3063 | } |
| 3064 | ---- |
David Pursehouse | 4e38b97 | 2014-05-30 10:36:40 +0900 | [diff] [blame] | 3065 | |
David Ostrovsky | a5ab829 | 2014-08-01 02:11:39 +0200 | [diff] [blame] | 3066 | [[put-edit-file]] |
| 3067 | === Change file content in Change Edit |
| 3068 | -- |
| 3069 | 'PUT /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile |
| 3070 | -- |
| 3071 | |
| 3072 | Put content of a file to a change edit. |
| 3073 | |
| 3074 | .Request |
| 3075 | ---- |
| 3076 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0 |
| 3077 | ---- |
| 3078 | |
Paladox none | 28920b4 | 2020-02-22 19:28:21 +0000 | [diff] [blame] | 3079 | To upload a file as binary data in the request body: |
| 3080 | |
| 3081 | .Request |
| 3082 | ---- |
| 3083 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0 |
| 3084 | Content-Type: application/json; charset=UTF-8 |
| 3085 | |
| 3086 | { |
jtrinh | 4ca1041 | 2022-10-04 10:05:34 -0700 | [diff] [blame] | 3087 | "binary_content": "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==", |
| 3088 | "file_mode": 100755 |
Paladox none | 28920b4 | 2020-02-22 19:28:21 +0000 | [diff] [blame] | 3089 | } |
| 3090 | ---- |
| 3091 | |
| 3092 | Note that it must be base-64 encoded data uri. |
| 3093 | |
jtrinh | 4ca1041 | 2022-10-04 10:05:34 -0700 | [diff] [blame] | 3094 | The "file_mode" field is optional, and if provided must be in octal format. The field |
| 3095 | indicates whether the file is executable or not and has a value of either 100755 |
| 3096 | (executable) or 100644 (not executable). If it's unset, this indicates no change |
| 3097 | has been made. New files default to not being executable if this parameter is not |
| 3098 | provided |
| 3099 | |
David Ostrovsky | a5ab829 | 2014-08-01 02:11:39 +0200 | [diff] [blame] | 3100 | When change edit doesn't exist for this change yet it is created. When file |
| 3101 | content isn't provided, it is wiped out for that file. As response |
| 3102 | "`204 No Content`" is returned. |
| 3103 | |
| 3104 | .Response |
| 3105 | ---- |
| 3106 | HTTP/1.1 204 No Content |
| 3107 | ---- |
| 3108 | |
Gal Paikin | 68d217b | 2019-10-07 21:01:22 +0200 | [diff] [blame] | 3109 | When the change edit is a no-op, for example when providing the same file |
| 3110 | content that the file already has, '409 no changes were made' is returned. |
| 3111 | |
| 3112 | .Response |
| 3113 | ---- |
| 3114 | HTTP/1.1 409 no changes were made |
| 3115 | ---- |
| 3116 | |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 3117 | [[post-edit]] |
David Ostrovsky | a00c953 | 2015-01-21 00:17:49 +0100 | [diff] [blame] | 3118 | === Restore file content or rename files in Change Edit |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 3119 | -- |
| 3120 | 'POST /changes/link:#change-id[\{change-id\}]/edit |
| 3121 | -- |
| 3122 | |
David Ostrovsky | a00c953 | 2015-01-21 00:17:49 +0100 | [diff] [blame] | 3123 | Creates empty change edit, restores file content or renames files in change |
| 3124 | edit. The request body needs to include a |
| 3125 | link:#change-edit-input[ChangeEditInput] entity when a file within change |
| 3126 | 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] | 3127 | |
| 3128 | .Request |
| 3129 | ---- |
| 3130 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3131 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 3132 | |
| 3133 | { |
David Ostrovsky | bd12e17 | 2014-08-21 23:08:15 +0200 | [diff] [blame] | 3134 | "restore_path": "foo" |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 3135 | } |
| 3136 | ---- |
| 3137 | |
David Ostrovsky | a00c953 | 2015-01-21 00:17:49 +0100 | [diff] [blame] | 3138 | or for rename: |
| 3139 | |
| 3140 | .Request |
| 3141 | ---- |
| 3142 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
| 3143 | Content-Type: application/json; charset=UTF-8 |
| 3144 | |
| 3145 | { |
| 3146 | "old_path": "foo", |
| 3147 | "new_path": "bar" |
| 3148 | } |
| 3149 | ---- |
| 3150 | |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 3151 | 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] | 3152 | and restore flag are provided in request body, this file is restored. When |
| 3153 | old and new file names are provided, the file is renamed. As response |
| 3154 | "`204 No Content`" is returned. |
David Ostrovsky | 138edb4 | 2014-08-15 21:31:43 +0200 | [diff] [blame] | 3155 | |
| 3156 | .Response |
| 3157 | ---- |
| 3158 | HTTP/1.1 204 No Content |
| 3159 | ---- |
| 3160 | |
David Ostrovsky | c967e15 | 2014-10-24 17:36:16 +0200 | [diff] [blame] | 3161 | [[put-change-edit-message]] |
| 3162 | === Change commit message in Change Edit |
| 3163 | -- |
| 3164 | 'PUT /changes/link:#change-id[\{change-id\}]/edit:message |
| 3165 | -- |
| 3166 | |
| 3167 | Modify commit message. The request body needs to include a |
| 3168 | link:#change-edit-message-input[ChangeEditMessageInput] |
| 3169 | entity. |
| 3170 | |
| 3171 | .Request |
| 3172 | ---- |
| 3173 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:message HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3174 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | c967e15 | 2014-10-24 17:36:16 +0200 | [diff] [blame] | 3175 | |
| 3176 | { |
| 3177 | "message": "New commit message\n\nChange-Id: I10394472cbd17dd12454f229e4f6de00b143a444" |
| 3178 | } |
| 3179 | ---- |
| 3180 | |
| 3181 | If a change edit doesn't exist for this change yet, it is created. As |
| 3182 | response "`204 No Content`" is returned. |
| 3183 | |
| 3184 | .Response |
| 3185 | ---- |
| 3186 | HTTP/1.1 204 No Content |
| 3187 | ---- |
| 3188 | |
David Ostrovsky | 2830c29 | 2014-08-01 02:24:31 +0200 | [diff] [blame] | 3189 | [[delete-edit-file]] |
| 3190 | === Delete file in Change Edit |
| 3191 | -- |
| 3192 | 'DELETE /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile' |
| 3193 | -- |
| 3194 | |
| 3195 | Deletes a file from a change edit. This deletes the file from the repository |
| 3196 | completely. This is not the same as reverting or restoring a file to its |
| 3197 | previous contents. |
| 3198 | |
| 3199 | .Request |
| 3200 | ---- |
| 3201 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0 |
| 3202 | ---- |
| 3203 | |
| 3204 | When change edit doesn't exist for this change yet it is created. |
| 3205 | |
| 3206 | .Response |
| 3207 | ---- |
| 3208 | HTTP/1.1 204 No Content |
| 3209 | ---- |
| 3210 | |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 3211 | [[get-edit-file]] |
| 3212 | === Retrieve file content from Change Edit |
| 3213 | -- |
| 3214 | 'GET /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile |
| 3215 | -- |
| 3216 | |
| 3217 | Retrieves content of a file from a change edit. |
| 3218 | |
| 3219 | .Request |
| 3220 | ---- |
| 3221 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0 |
| 3222 | ---- |
| 3223 | |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 3224 | The content of the file is returned as text encoded inside base64. |
| 3225 | The Content-Type header will always be `text/plain` reflecting the |
| 3226 | outer base64 encoding. A Gerrit-specific `X-FYI-Content-Type` header |
| 3227 | can be examined to find the server detected content type of the file. |
| 3228 | |
| 3229 | When the specified file was deleted in the change edit |
| 3230 | "`204 No Content`" is returned. |
| 3231 | |
| 3232 | If only the content type is required, callers should use HEAD to |
| 3233 | avoid downloading the encoded file contents. |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 3234 | |
Michael Zhou | 551ad0c | 2016-04-26 01:21:42 -0400 | [diff] [blame] | 3235 | If the `base` parameter is set to true, the returned content is from the |
| 3236 | revision that the edit is based on. |
| 3237 | |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 3238 | .Response |
| 3239 | ---- |
| 3240 | HTTP/1.1 200 OK |
| 3241 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3242 | Content-Type: text/plain; charset=ISO-8859-1 |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 3243 | X-FYI-Content-Encoding: base64 |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 3244 | X-FYI-Content-Type: text/xml |
David Ostrovsky | fd6c175 | 2014-08-01 19:43:21 +0200 | [diff] [blame] | 3245 | |
| 3246 | RnJvbSA3ZGFkY2MxNTNmZGVhMTdhYTg0ZmYzMmE2ZTI0NWRiYjY... |
| 3247 | ---- |
| 3248 | |
David Ostrovsky | d007867 | 2015-02-06 21:51:04 +0100 | [diff] [blame] | 3249 | Alternatively, if the only value of the Accept request header is |
| 3250 | `application/json` the content is returned as JSON string and |
| 3251 | `X-FYI-Content-Encoding` is set to `json`. |
| 3252 | |
David Ostrovsky | 9ea9c11 | 2015-01-25 00:12:38 +0100 | [diff] [blame] | 3253 | [[get-edit-meta-data]] |
| 3254 | === Retrieve meta data of a file from Change Edit |
| 3255 | -- |
| 3256 | 'GET /changes/link:#change-id[\{change-id\}]/edit/path%2fto%2ffile/meta |
| 3257 | -- |
| 3258 | |
| 3259 | Retrieves meta data of a file from a change edit. Currently only |
| 3260 | web links are returned. |
| 3261 | |
| 3262 | .Request |
| 3263 | ---- |
| 3264 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo/meta HTTP/1.0 |
| 3265 | ---- |
| 3266 | |
| 3267 | This REST endpoint retrieves additional information for a file in a |
| 3268 | change edit. As result an link:#edit-file-info[EditFileInfo] entity is |
| 3269 | returned. |
| 3270 | |
| 3271 | .Response |
| 3272 | ---- |
| 3273 | HTTP/1.1 200 OK |
| 3274 | Content-Disposition: attachment |
| 3275 | Content-Type: application/json; charset=UTF-8 |
| 3276 | |
| 3277 | )]}' |
| 3278 | { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 3279 | "web_links": [ |
David Ostrovsky | 9ea9c11 | 2015-01-25 00:12:38 +0100 | [diff] [blame] | 3280 | { |
| 3281 | "show_on_side_by_side_diff_view": true, |
| 3282 | "name": "side-by-side preview diff", |
| 3283 | "image_url": "plugins/xdocs/static/sideBySideDiffPreview.png", |
| 3284 | "url": "#/x/xdocs/c/42/1..0/README.md", |
| 3285 | "target": "_self" |
| 3286 | }, |
| 3287 | { |
| 3288 | "show_on_unified_diff_view": true, |
| 3289 | "name": "unified preview diff", |
| 3290 | "image_url": "plugins/xdocs/static/unifiedDiffPreview.png", |
| 3291 | "url": "#/x/xdocs/c/42/1..0/README.md,unified", |
| 3292 | "target": "_self" |
| 3293 | } |
| 3294 | ]} |
| 3295 | ---- |
| 3296 | |
David Ostrovsky | 3d2c070 | 2014-10-28 23:44:27 +0100 | [diff] [blame] | 3297 | [[get-edit-message]] |
| 3298 | === Retrieve commit message from Change Edit or current patch set of the change |
| 3299 | -- |
| 3300 | 'GET /changes/link:#change-id[\{change-id\}]/edit:message |
| 3301 | -- |
| 3302 | |
David Ostrovsky | 25ad15e | 2014-12-15 21:18:59 +0100 | [diff] [blame] | 3303 | Retrieves commit message from change edit. |
David Ostrovsky | 3d2c070 | 2014-10-28 23:44:27 +0100 | [diff] [blame] | 3304 | |
David Ostrovsky | 0ee0bb2 | 2016-05-31 22:47:47 +0200 | [diff] [blame] | 3305 | If the `base` parameter is set to true, the returned message is from the |
| 3306 | revision that the edit is based on. |
| 3307 | |
David Ostrovsky | 3d2c070 | 2014-10-28 23:44:27 +0100 | [diff] [blame] | 3308 | .Request |
| 3309 | ---- |
| 3310 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:message HTTP/1.0 |
| 3311 | ---- |
| 3312 | |
| 3313 | The commit message is returned as base64 encoded string. |
| 3314 | |
| 3315 | .Response |
| 3316 | ---- |
| 3317 | HTTP/1.1 200 OK |
| 3318 | |
| 3319 | VGhpcyBpcyBhIGNvbW1pdCBtZXNzYWdlCgpDaGFuZ2UtSWQ6IElhYzhmZGM1MGRlZjFiYWUzYjAz |
| 3320 | M2JhNjcxZTk0OTBmNzUxNDU5ZGUzCg== |
| 3321 | ---- |
| 3322 | |
David Ostrovsky | d007867 | 2015-02-06 21:51:04 +0100 | [diff] [blame] | 3323 | Alternatively, if the only value of the Accept request header is |
| 3324 | `application/json` the commit message is returned as JSON string: |
| 3325 | |
| 3326 | .Response |
| 3327 | ---- |
| 3328 | HTTP/1.1 200 OK |
| 3329 | |
| 3330 | )]}' |
| 3331 | "Subject of the commit message\n\nThis is the body of the commit message.\n\nChange-Id: Iaf1ba916bf843c175673d675bf7f52862f452db9\n" |
| 3332 | ---- |
| 3333 | |
| 3334 | |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 3335 | [[publish-edit]] |
| 3336 | === Publish Change Edit |
| 3337 | -- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 3338 | 'POST /changes/link:#change-id[\{change-id\}]/edit:publish |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 3339 | -- |
| 3340 | |
| 3341 | Promotes change edit to a regular patch set. |
| 3342 | |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 3343 | Options can be provided in the request body as a |
| 3344 | link:#publish-change-edit-input[PublishChangeEditInput] entity. |
| 3345 | |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 3346 | .Request |
| 3347 | ---- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 3348 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:publish HTTP/1.0 |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 3349 | Content-Type: application/json; charset=UTF-8 |
| 3350 | |
| 3351 | { |
| 3352 | "notify": "NONE" |
| 3353 | } |
David Ostrovsky | e9988f9 | 2014-08-01 09:56:34 +0200 | [diff] [blame] | 3354 | ---- |
| 3355 | |
| 3356 | As response "`204 No Content`" is returned. |
| 3357 | |
| 3358 | .Response |
| 3359 | ---- |
| 3360 | HTTP/1.1 204 No Content |
| 3361 | ---- |
| 3362 | |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 3363 | [[rebase-edit]] |
| 3364 | === Rebase Change Edit |
| 3365 | -- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 3366 | 'POST /changes/link:#change-id[\{change-id\}]/edit:rebase |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 3367 | -- |
| 3368 | |
| 3369 | Rebases change edit on top of latest patch set. |
| 3370 | |
| 3371 | .Request |
| 3372 | ---- |
David Ostrovsky | 9cbdb20 | 2014-11-11 22:39:59 +0100 | [diff] [blame] | 3373 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:rebase HTTP/1.0 |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 3374 | ---- |
| 3375 | |
| 3376 | When change was rebased on top of latest patch set, response |
David Pursehouse | 56fbc08 | 2015-05-19 16:33:03 +0900 | [diff] [blame] | 3377 | "`204 No Content`" is returned. When change edit is already |
David Ostrovsky | 46999d2 | 2014-08-16 02:19:13 +0200 | [diff] [blame] | 3378 | based on top of the latest patch set, the response |
| 3379 | "`409 Conflict`" is returned. |
| 3380 | |
| 3381 | .Response |
| 3382 | ---- |
| 3383 | HTTP/1.1 204 No Content |
| 3384 | ---- |
| 3385 | |
David Ostrovsky | 8e75f50 | 2014-08-10 00:36:31 +0200 | [diff] [blame] | 3386 | [[delete-edit]] |
| 3387 | === Delete Change Edit |
| 3388 | -- |
| 3389 | 'DELETE /changes/link:#change-id[\{change-id\}]/edit' |
| 3390 | -- |
| 3391 | |
| 3392 | Deletes change edit. |
| 3393 | |
| 3394 | .Request |
| 3395 | ---- |
| 3396 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit HTTP/1.0 |
| 3397 | ---- |
| 3398 | |
| 3399 | As response "`204 No Content`" is returned. |
| 3400 | |
| 3401 | .Response |
| 3402 | ---- |
| 3403 | HTTP/1.1 204 No Content |
| 3404 | ---- |
| 3405 | |
Edwin Kempin | 9a9f1c0 | 2017-01-02 15:10:49 +0100 | [diff] [blame] | 3406 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 3407 | [[reviewer-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3408 | == Reviewer Endpoints |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 3409 | |
| 3410 | [[list-reviewers]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3411 | === List Reviewers |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3412 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3413 | 'GET /changes/link:#change-id[\{change-id\}]/reviewers/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3414 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3415 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 3416 | Lists the reviewers of a change. |
| 3417 | |
| 3418 | As result a list of link:#reviewer-info[ReviewerInfo] entries is returned. |
| 3419 | |
| 3420 | .Request |
| 3421 | ---- |
| 3422 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/ HTTP/1.0 |
| 3423 | ---- |
| 3424 | |
| 3425 | .Response |
| 3426 | ---- |
| 3427 | HTTP/1.1 200 OK |
| 3428 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3429 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 3430 | |
| 3431 | )]}' |
| 3432 | [ |
| 3433 | { |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 3434 | "approvals": { |
| 3435 | "Verified": "+1", |
| 3436 | "Code-Review": "+2" |
| 3437 | }, |
| 3438 | "_account_id": 1000096, |
| 3439 | "name": "John Doe", |
| 3440 | "email": "john.doe@example.com" |
| 3441 | }, |
| 3442 | { |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 3443 | "approvals": { |
| 3444 | "Verified": " 0", |
| 3445 | "Code-Review": "-1" |
| 3446 | }, |
| 3447 | "_account_id": 1000097, |
| 3448 | "name": "Jane Roe", |
| 3449 | "email": "jane.roe@example.com" |
| 3450 | } |
| 3451 | ] |
| 3452 | ---- |
| 3453 | |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3454 | [[suggest-reviewers]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3455 | === Suggest Reviewers |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3456 | -- |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3457 | '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] | 3458 | -- |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3459 | |
| 3460 | Suggest the reviewers for a given query `q` and result limit `n`. If result |
| 3461 | limit is not passed, then the default 10 is used. |
| 3462 | |
Edwin Kempin | 2639eaa | 2019-08-27 09:47:27 +0200 | [diff] [blame] | 3463 | This REST endpoint only suggests accounts that |
| 3464 | |
| 3465 | * are active |
| 3466 | * can see the change |
| 3467 | * are visible to the calling user |
| 3468 | * are not already reviewer on the change |
| 3469 | * don't own the change |
Edwin Kempin | ad55dde | 2021-09-28 11:30:55 +0200 | [diff] [blame] | 3470 | * are not service users (unless |
| 3471 | link:config.html#suggest.skipServiceUsers[skipServiceUsers] is set to `false`) |
Edwin Kempin | 2639eaa | 2019-08-27 09:47:27 +0200 | [diff] [blame] | 3472 | |
Edwin Kempin | ec02a55 | 2019-08-27 09:30:15 +0200 | [diff] [blame] | 3473 | Groups can be excluded from the results by specifying the 'exclude-groups' |
| 3474 | request parameter: |
| 3475 | |
| 3476 | -- |
| 3477 | 'GET /changes/link:#change-id[\{change-id\}]/suggest_reviewers?q=J&n=5&exclude-groups' |
| 3478 | -- |
Patrick Hiesel | c79ae0e | 2017-06-28 14:50:53 +0200 | [diff] [blame] | 3479 | |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3480 | As result a list of link:#suggested-reviewer-info[SuggestedReviewerInfo] entries is returned. |
| 3481 | |
| 3482 | .Request |
| 3483 | ---- |
| 3484 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/suggest_reviewers?q=J HTTP/1.0 |
| 3485 | ---- |
| 3486 | |
| 3487 | .Response |
| 3488 | ---- |
| 3489 | HTTP/1.1 200 OK |
| 3490 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3491 | Content-Type: application/json; charset=UTF-8 |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3492 | |
| 3493 | )]}' |
| 3494 | [ |
| 3495 | { |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3496 | "account": { |
| 3497 | "_account_id": 1000097, |
| 3498 | "name": "Jane Roe", |
| 3499 | "email": "jane.roe@example.com" |
Logan Hanks | ab3c81e | 2016-07-20 15:42:52 -0700 | [diff] [blame] | 3500 | }, |
| 3501 | "count": 1 |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3502 | }, |
| 3503 | { |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3504 | "group": { |
| 3505 | "id": "4fd581c0657268f2bdcc26699fbf9ddb76e3a279", |
| 3506 | "name": "Joiner" |
Logan Hanks | ab3c81e | 2016-07-20 15:42:52 -0700 | [diff] [blame] | 3507 | }, |
| 3508 | "count": 5 |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 3509 | } |
| 3510 | ] |
| 3511 | ---- |
| 3512 | |
Edwin Kempin | 0ca3f72 | 2019-08-27 09:43:31 +0200 | [diff] [blame] | 3513 | To suggest CCs `reviewer-state=CC` can be specified as additional URL |
| 3514 | parameter. This includes existing reviewers in the result, but excludes |
| 3515 | existing CCs. |
| 3516 | |
| 3517 | -- |
| 3518 | 'GET /changes/link:#change-id[\{change-id\}]/suggest_reviewers?q=J&reviewer-state=CC' |
| 3519 | -- |
| 3520 | |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 3521 | [[get-reviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3522 | === Get Reviewer |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3523 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3524 | '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] | 3525 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3526 | |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 3527 | Retrieves a reviewer of a change. |
| 3528 | |
| 3529 | As response a link:#reviewer-info[ReviewerInfo] entity is returned that |
| 3530 | describes the reviewer. |
| 3531 | |
| 3532 | .Request |
| 3533 | ---- |
| 3534 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/john.doe@example.com HTTP/1.0 |
| 3535 | ---- |
| 3536 | |
| 3537 | .Response |
| 3538 | ---- |
| 3539 | HTTP/1.1 200 OK |
| 3540 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3541 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 3542 | |
| 3543 | )]}' |
| 3544 | { |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 3545 | "approvals": { |
| 3546 | "Verified": "+1", |
| 3547 | "Code-Review": "+2" |
| 3548 | }, |
| 3549 | "_account_id": 1000096, |
| 3550 | "name": "John Doe", |
| 3551 | "email": "john.doe@example.com" |
| 3552 | } |
| 3553 | ---- |
| 3554 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3555 | [[add-reviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3556 | === Add Reviewer |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3557 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3558 | 'POST /changes/link:#change-id[\{change-id\}]/reviewers' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3559 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3560 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3561 | Adds one user or all members of one group as reviewer to the change. |
| 3562 | |
| 3563 | The reviewer to be added to the change must be provided in the request |
| 3564 | body as a link:#reviewer-input[ReviewerInput] entity. |
| 3565 | |
Edwin Kempin | f9f1941 | 2019-08-28 09:28:51 +0200 | [diff] [blame] | 3566 | Users can be moved from reviewer to CC and vice versa. This means if a |
| 3567 | user is added as CC that is already a reviewer on the change, the |
| 3568 | reviewer state of that user is updated to CC. If a user that is already |
| 3569 | a CC on the change is added as reviewer, the reviewer state of that |
| 3570 | user is updated to reviewer. |
| 3571 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 3572 | Adding a new reviewer also adds that reviewer to the attention set, unless |
| 3573 | the change is work in progress. |
| 3574 | Also, moving a reviewer to CC removes that user from the attention set. |
| 3575 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3576 | .Request |
| 3577 | ---- |
| 3578 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3579 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3580 | |
| 3581 | { |
| 3582 | "reviewer": "john.doe@example.com" |
| 3583 | } |
| 3584 | ---- |
| 3585 | |
Gal Paikin | 721a40b | 2021-04-15 09:30:00 +0200 | [diff] [blame] | 3586 | As response an link:#reviewer-result[ReviewerResult] entity is |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3587 | returned that describes the newly added reviewers. |
| 3588 | |
| 3589 | .Response |
| 3590 | ---- |
| 3591 | HTTP/1.1 200 OK |
| 3592 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3593 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3594 | |
| 3595 | )]}' |
| 3596 | { |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 3597 | "input": "john.doe@example.com", |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3598 | "reviewers": [ |
| 3599 | { |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 3600 | "_account_id": 1000096, |
| 3601 | "name": "John Doe", |
| 3602 | "email": "john.doe@example.com" |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3603 | "approvals": { |
| 3604 | "Verified": " 0", |
| 3605 | "Code-Review": " 0" |
| 3606 | }, |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3607 | } |
| 3608 | ] |
| 3609 | } |
| 3610 | ---- |
| 3611 | |
| 3612 | If a group is specified, adding the group members as reviewers is an |
| 3613 | atomic operation. This means if an error is returned, none of the |
| 3614 | members are added as reviewer. |
| 3615 | |
| 3616 | If a group with many members is added as reviewer a confirmation may be |
| 3617 | required. |
| 3618 | |
Edwin Kempin | f9f1941 | 2019-08-28 09:28:51 +0200 | [diff] [blame] | 3619 | If a group is added as CC and members of this group are already |
| 3620 | reviewers on the change, these members stay reviewers on the change |
| 3621 | (they are not downgraded to CC). However if a group is added as |
| 3622 | reviewer, all group members become reviewer of the change, even if they |
| 3623 | have been added as CC before. |
| 3624 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3625 | .Request |
| 3626 | ---- |
| 3627 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3628 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3629 | |
| 3630 | { |
| 3631 | "reviewer": "MyProjectVerifiers" |
| 3632 | } |
| 3633 | ---- |
| 3634 | |
| 3635 | .Response |
| 3636 | ---- |
| 3637 | HTTP/1.1 200 OK |
| 3638 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3639 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3640 | |
| 3641 | )]}' |
| 3642 | { |
Logan Hanks | 23e7028 | 2016-07-06 14:31:56 -0700 | [diff] [blame] | 3643 | "input": "MyProjectVerifiers", |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3644 | "error": "The group My Group has 15 members. Do you want to add them all as reviewers?", |
| 3645 | "confirm": true |
| 3646 | } |
| 3647 | ---- |
| 3648 | |
| 3649 | To confirm the addition of the reviewers, resend the request with the |
Edwin Kempin | 08da43d | 2013-02-26 11:06:58 +0100 | [diff] [blame] | 3650 | `confirmed` flag being set. |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3651 | |
| 3652 | .Request |
| 3653 | ---- |
| 3654 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3655 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3656 | |
| 3657 | { |
Logan Hanks | 23e7028 | 2016-07-06 14:31:56 -0700 | [diff] [blame] | 3658 | "input": "MyProjectVerifiers", |
Edwin Kempin | 08da43d | 2013-02-26 11:06:58 +0100 | [diff] [blame] | 3659 | "confirmed": true |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 3660 | } |
| 3661 | ---- |
| 3662 | |
Patrick Hiesel | 11873ef | 2017-03-17 17:36:05 +0100 | [diff] [blame] | 3663 | If link:config-project-config.html#reviewer.enableByEmail[reviewer.enableByEmail] is set |
| 3664 | for the project, reviewers and CCs are not required to have a Gerrit account. If you POST |
| 3665 | an email address of a reviewer or CC then, they will be added to the change even if they |
| 3666 | don't have a Gerrit account. |
| 3667 | |
| 3668 | If this option is disabled, the request would fail with `400 Bad Request` if the email |
| 3669 | address can't be resolved to an active Gerrit account. |
| 3670 | |
| 3671 | Note that the name is optional so both "un.registered@reviewer.com" and |
| 3672 | "John Doe <un.registered@reviewer.com>" are valid inputs. |
| 3673 | |
| 3674 | Reviewers without Gerrit accounts can only be added on changes visible to anonymous users. |
| 3675 | |
| 3676 | .Request |
| 3677 | ---- |
| 3678 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers HTTP/1.0 |
| 3679 | Content-Type: application/json; charset=UTF-8 |
| 3680 | |
| 3681 | { |
| 3682 | "reviewer": "John Doe <un.registered@reviewer.com>" |
| 3683 | } |
| 3684 | ---- |
| 3685 | |
| 3686 | .Response |
| 3687 | ---- |
| 3688 | HTTP/1.1 200 OK |
| 3689 | Content-Disposition: attachment |
| 3690 | Content-Type: application/json; charset=UTF-8 |
| 3691 | |
| 3692 | )]}' |
| 3693 | { |
| 3694 | "input": "John Doe <un.registered@reviewer.com>" |
| 3695 | } |
| 3696 | ---- |
| 3697 | |
Logan Hanks | f03040e | 2017-05-03 09:40:56 -0700 | [diff] [blame] | 3698 | .Notifications |
| 3699 | |
| 3700 | An email will be sent using the "newchange" template. |
| 3701 | |
| 3702 | [options="header",cols="1,1,1"] |
| 3703 | |============================= |
| 3704 | |WIP State |Default|notify=ALL |
| 3705 | |Ready for review|owner, reviewers, CCs|owner, reviewers, CCs |
| 3706 | |Work in progress|not sent|owner, reviewers, CCs |
| 3707 | |============================= |
| 3708 | |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 3709 | [[delete-reviewer]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3710 | === Delete Reviewer |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3711 | -- |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 3712 | 'DELETE /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]' + |
| 3713 | '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] | 3714 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3715 | |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 3716 | Deletes a reviewer from a change. |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 3717 | Deleting a reviewer also removes that user from the attention set. |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 3718 | |
| 3719 | .Request |
| 3720 | ---- |
| 3721 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe HTTP/1.0 |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 3722 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/delete HTTP/1.0 |
| 3723 | ---- |
| 3724 | |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 3725 | Options can be provided in the request body as a |
| 3726 | link:#delete-reviewer-input[DeleteReviewerInput] entity. |
| 3727 | Historically, this method allowed a body in the DELETE, but that behavior is |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3728 | link:https://www.gerritcodereview.com/releases/2.16.md[deprecated,role=external,window=_blank]. |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 3729 | In this case, use a POST request instead: |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 3730 | |
| 3731 | .Request |
| 3732 | ---- |
| 3733 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/delete HTTP/1.0 |
| 3734 | Content-Type: application/json; charset=UTF-8 |
| 3735 | |
| 3736 | { |
| 3737 | "notify": "NONE" |
| 3738 | } |
Edwin Kempin | 5330107 | 2013-02-25 12:57:07 +0100 | [diff] [blame] | 3739 | ---- |
| 3740 | |
| 3741 | .Response |
| 3742 | ---- |
| 3743 | HTTP/1.1 204 No Content |
| 3744 | ---- |
| 3745 | |
Logan Hanks | 8760741 | 2017-05-30 13:49:04 -0700 | [diff] [blame] | 3746 | .Notifications |
| 3747 | |
| 3748 | An email will be sent using the "deleteReviewer" template. If deleting the |
| 3749 | reviewer resulted in one or more approvals being removed, then the deleted |
| 3750 | reviewer will also receive a notification (unless notify=NONE). |
| 3751 | |
| 3752 | [options="header",cols="1,5"] |
| 3753 | |============================= |
| 3754 | |WIP State |Default Recipients |
| 3755 | |Ready for review|notify=ALL: deleted reviewer (if voted), owner, reviewers, CCs, stars, ALL_COMMENTS watchers |
| 3756 | |Work in progress|notify=NONE: deleted reviewer (if voted) |
| 3757 | |============================= |
| 3758 | |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 3759 | [[list-votes]] |
| 3760 | === List Votes |
| 3761 | -- |
| 3762 | 'GET /changes/link:#change-id[\{change-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/votes/' |
| 3763 | -- |
| 3764 | |
| 3765 | Lists the votes for a specific reviewer of the change. |
| 3766 | |
| 3767 | .Request |
| 3768 | ---- |
Edwin Kempin | 314f10a | 2016-07-11 11:39:05 +0200 | [diff] [blame] | 3769 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/ HTTP/1.0 |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 3770 | ---- |
| 3771 | |
| 3772 | As result a map is returned that maps the label name to the label value. |
| 3773 | The entries in the map are sorted by label name. |
| 3774 | |
| 3775 | .Response |
| 3776 | ---- |
| 3777 | HTTP/1.1 200 OK |
| 3778 | Content-Disposition: attachment |
| 3779 | Content-Type: application/json;charset=UTF-8 |
| 3780 | |
| 3781 | )]}' |
| 3782 | { |
| 3783 | "Code-Review": -1, |
| 3784 | "Verified": 1 |
| 3785 | "Work-In-Progress": 1, |
| 3786 | } |
| 3787 | ---- |
| 3788 | |
| 3789 | [[delete-vote]] |
| 3790 | === Delete Vote |
| 3791 | -- |
Edwin Kempin | 5488dc1 | 2016-08-29 11:13:31 +0200 | [diff] [blame] | 3792 | '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] | 3793 | '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] | 3794 | -- |
| 3795 | |
| 3796 | Deletes a single vote from a change. Note, that even when the last vote of |
| 3797 | a reviewer is removed the reviewer itself is still listed on the change. |
| 3798 | |
Gal Paikin | 6ce56dc | 2021-03-29 12:28:43 +0200 | [diff] [blame] | 3799 | If another user removed a user's vote, the user with the deleted vote will be |
| 3800 | added to the attention set. |
| 3801 | |
Dmitrii Filippov | 3e0bbb7 | 2023-02-22 12:57:00 +0100 | [diff] [blame] | 3802 | The request returns: |
| 3803 | * '204 No Content' if the vote is deleted successfully; |
| 3804 | * '404 Not Found' when the vote to be deleted is zero or not present. |
| 3805 | |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 3806 | .Request |
| 3807 | ---- |
| 3808 | 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] | 3809 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/Code-Review/delete HTTP/1.0 |
| 3810 | ---- |
| 3811 | |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 3812 | Options can be provided in the request body as a |
| 3813 | link:#delete-vote-input[DeleteVoteInput] entity. |
| 3814 | Historically, this method allowed a body in the DELETE, but that behavior is |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 3815 | link:https://www.gerritcodereview.com/releases/2.16.md[deprecated,role=external,window=_blank]. |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 3816 | In this case, use a POST request instead: |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 3817 | |
| 3818 | .Request |
| 3819 | ---- |
| 3820 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/Code-Review/delete HTTP/1.0 |
| 3821 | Content-Type: application/json; charset=UTF-8 |
| 3822 | |
| 3823 | { |
| 3824 | "notify": "NONE" |
| 3825 | } |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 3826 | ---- |
| 3827 | |
| 3828 | .Response |
| 3829 | ---- |
| 3830 | HTTP/1.1 204 No Content |
| 3831 | ---- |
| 3832 | |
Logan Hanks | a1e68dc | 2017-06-29 15:13:27 -0700 | [diff] [blame] | 3833 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 3834 | [[revision-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3835 | == Revision Endpoints |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 3836 | |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 3837 | [[get-commit]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3838 | === Get Commit |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3839 | -- |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 3840 | '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] | 3841 | -- |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 3842 | |
| 3843 | Retrieves a parsed commit of a revision. |
| 3844 | |
| 3845 | .Request |
| 3846 | ---- |
| 3847 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/commit HTTP/1.0 |
| 3848 | ---- |
| 3849 | |
| 3850 | As response a link:#commit-info[CommitInfo] entity is returned that |
| 3851 | describes the revision. |
| 3852 | |
| 3853 | .Response |
| 3854 | ---- |
| 3855 | HTTP/1.1 200 OK |
| 3856 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 3857 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 3858 | |
| 3859 | )]}' |
| 3860 | { |
Edwin Kempin | c823740 | 2015-07-15 18:27:55 +0200 | [diff] [blame] | 3861 | "commit": "674ac754f91e64a0efb8087e59a176484bd534d1", |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 3862 | "parents": [ |
| 3863 | { |
| 3864 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 3865 | "subject": "Migrate contributor agreements to All-Projects." |
| 3866 | } |
| 3867 | ], |
| 3868 | "author": { |
| 3869 | "name": "Shawn O. Pearce", |
| 3870 | "email": "sop@google.com", |
| 3871 | "date": "2012-04-24 18:08:08.000000000", |
| 3872 | "tz": -420 |
| 3873 | }, |
| 3874 | "committer": { |
| 3875 | "name": "Shawn O. Pearce", |
| 3876 | "email": "sop@google.com", |
| 3877 | "date": "2012-04-24 18:08:08.000000000", |
| 3878 | "tz": -420 |
| 3879 | }, |
| 3880 | "subject": "Use an EventBus to manage star icons", |
| 3881 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 3882 | } |
| 3883 | ---- |
| 3884 | |
Sven Selberg | d26bd54 | 2014-11-21 16:28:10 +0100 | [diff] [blame] | 3885 | Adding query parameter `links` (for example `/changes/.../commit?links`) |
| 3886 | returns a link:#commit-info[CommitInfo] with the additional field `web_links`. |
Shawn Pearce | 728ba88 | 2013-07-08 23:13:08 -0700 | [diff] [blame] | 3887 | |
Kasper Nilsson | 9f2ed6a | 2016-11-15 11:12:37 -0800 | [diff] [blame] | 3888 | [[get-description]] |
| 3889 | === Get Description |
| 3890 | -- |
| 3891 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/description' |
| 3892 | -- |
| 3893 | |
| 3894 | Retrieves the description of a patch set. |
| 3895 | |
| 3896 | .Request |
| 3897 | ---- |
| 3898 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/description HTTP/1.0 |
| 3899 | ---- |
| 3900 | |
| 3901 | .Response |
| 3902 | ---- |
| 3903 | HTTP/1.1 200 OK |
| 3904 | Content-Disposition: attachment |
| 3905 | Content-Type: application/json; charset=UTF-8 |
| 3906 | |
| 3907 | )]}' |
| 3908 | "Added Documentation" |
| 3909 | ---- |
| 3910 | |
| 3911 | If the patch set does not have a description an empty string is returned. |
| 3912 | |
| 3913 | [[set-description]] |
| 3914 | === Set Description |
| 3915 | -- |
| 3916 | 'PUT /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/description' |
| 3917 | -- |
| 3918 | |
| 3919 | Sets the description of a patch set. |
| 3920 | |
| 3921 | The new description must be provided in the request body inside a |
| 3922 | link:#description-input[DescriptionInput] entity. |
| 3923 | |
| 3924 | .Request |
| 3925 | ---- |
| 3926 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/description HTTP/1.0 |
| 3927 | Content-Type: application/json; charset=UTF-8 |
| 3928 | |
| 3929 | { |
| 3930 | "description": "Added Documentation" |
| 3931 | } |
| 3932 | ---- |
| 3933 | |
| 3934 | As response the new description is returned. |
| 3935 | |
| 3936 | .Response |
| 3937 | ---- |
| 3938 | HTTP/1.1 200 OK |
| 3939 | Content-Disposition: attachment |
| 3940 | Content-Type: application/json; charset=UTF-8 |
| 3941 | |
| 3942 | )]}' |
| 3943 | "Added Documentation" |
| 3944 | ---- |
| 3945 | |
Edwin Kempin | 0f22944 | 2016-09-09 13:06:12 +0200 | [diff] [blame] | 3946 | [[get-merge-list]] |
| 3947 | === Get Merge List |
| 3948 | -- |
| 3949 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/mergelist' |
| 3950 | -- |
| 3951 | |
| 3952 | Returns the list of commits that are being integrated into a target |
| 3953 | branch by a merge commit. By default the first parent is assumed to be |
| 3954 | uninteresting. By using the `parent` option another parent can be set |
| 3955 | as uninteresting (parents are 1-based). |
| 3956 | |
| 3957 | The list of commits is returned as a list of |
| 3958 | link:#commit-info[CommitInfo] entities. Web links are only included if |
| 3959 | the `links` option was set. |
| 3960 | |
| 3961 | .Request |
| 3962 | ---- |
| 3963 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/7e30d802b890ec8d0be45b1cc2a8ef092bcfc858/mergelist HTTP/1.0 |
| 3964 | ---- |
| 3965 | |
| 3966 | .Response |
| 3967 | ---- |
| 3968 | HTTP/1.1 200 OK |
| 3969 | Content-Disposition: attachment |
| 3970 | Content-Type: application/json; charset=UTF-8 |
| 3971 | |
| 3972 | )]}' |
| 3973 | [ |
| 3974 | { |
| 3975 | "commit": "674ac754f91e64a0efb8087e59a176484bd534d1", |
| 3976 | "parents": [ |
| 3977 | { |
| 3978 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 3979 | "subject": "Migrate contributor agreements to All-Projects." |
| 3980 | } |
| 3981 | ], |
| 3982 | "author": { |
| 3983 | "name": "Shawn O. Pearce", |
| 3984 | "email": "sop@google.com", |
| 3985 | "date": "2012-04-24 18:08:08.000000000", |
| 3986 | "tz": -420 |
| 3987 | }, |
| 3988 | "committer": { |
| 3989 | "name": "Shawn O. Pearce", |
| 3990 | "email": "sop@google.com", |
| 3991 | "date": "2012-04-24 18:08:08.000000000", |
| 3992 | "tz": -420 |
| 3993 | }, |
| 3994 | "subject": "Use an EventBus to manage star icons", |
| 3995 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 3996 | } |
| 3997 | ] |
| 3998 | ---- |
| 3999 | |
Stefan Beller | c725966 | 2015-02-12 17:23:05 -0800 | [diff] [blame] | 4000 | [[get-revision-actions]] |
| 4001 | === Get Revision Actions |
| 4002 | -- |
| 4003 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/actions' |
| 4004 | -- |
| 4005 | |
| 4006 | Retrieves revision link:#action-info[actions] of the revision of a change. |
| 4007 | |
| 4008 | .Request |
| 4009 | ---- |
| 4010 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/actions' HTTP/1.0 |
| 4011 | ---- |
| 4012 | |
| 4013 | .Response |
| 4014 | ---- |
| 4015 | HTTP/1.1 200 OK |
| 4016 | Content-Disposition: attachment |
| 4017 | Content-Type: application/json; charset=UTF-8 |
| 4018 | |
| 4019 | )]}' |
| 4020 | |
| 4021 | { |
| 4022 | "submit": { |
| 4023 | "method": "POST", |
| 4024 | "label": "Submit", |
| 4025 | "title": "Submit patch set 1 into master", |
| 4026 | "enabled": true |
| 4027 | }, |
| 4028 | "cherrypick": { |
| 4029 | "method": "POST", |
| 4030 | "label": "Cherry Pick", |
| 4031 | "title": "Cherry pick change to a different branch", |
| 4032 | "enabled": true |
| 4033 | } |
| 4034 | } |
| 4035 | ---- |
| 4036 | |
Han-Wen Nienhuys | 86db767 | 2021-08-10 12:45:58 +0200 | [diff] [blame] | 4037 | The response is a flat map of possible revision REST endpoint names |
| 4038 | mapped to their link:#action-info[ActionInfo]. |
Stefan Beller | c725966 | 2015-02-12 17:23:05 -0800 | [diff] [blame] | 4039 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4040 | [[get-review]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4041 | === Get Review |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4042 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4043 | '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] | 4044 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4045 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4046 | Retrieves a review of a revision. |
| 4047 | |
| 4048 | .Request |
| 4049 | ---- |
| 4050 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/review HTTP/1.0 |
| 4051 | ---- |
| 4052 | |
| 4053 | As response a link:#change-info[ChangeInfo] entity with |
| 4054 | link:#detailed-labels[detailed labels] and link:#detailed-accounts[ |
| 4055 | detailed accounts] is returned that describes the review of the |
| 4056 | revision. The revision for which the review is retrieved is contained |
| 4057 | in the `revisions` field. In addition the `current_revision` field is |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 4058 | 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] | 4059 | revision of the change. Please note that the returned labels are always |
| 4060 | for the current patch set. |
| 4061 | |
| 4062 | .Response |
| 4063 | ---- |
| 4064 | HTTP/1.1 200 OK |
| 4065 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4066 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4067 | |
| 4068 | )]}' |
| 4069 | { |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4070 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 4071 | "project": "myProject", |
| 4072 | "branch": "master", |
| 4073 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 4074 | "subject": "Implementing Feature X", |
| 4075 | "status": "NEW", |
| 4076 | "created": "2013-02-01 09:59:32.126000000", |
| 4077 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4078 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 4079 | "insertions": 34, |
| 4080 | "deletions": 45, |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4081 | "_number": 3965, |
| 4082 | "owner": { |
| 4083 | "_account_id": 1000096, |
| 4084 | "name": "John Doe", |
| 4085 | "email": "john.doe@example.com" |
| 4086 | }, |
| 4087 | "labels": { |
| 4088 | "Verified": { |
| 4089 | "all": [ |
| 4090 | { |
| 4091 | "value": 0, |
| 4092 | "_account_id": 1000096, |
| 4093 | "name": "John Doe", |
| 4094 | "email": "john.doe@example.com" |
| 4095 | }, |
| 4096 | { |
| 4097 | "value": 0, |
| 4098 | "_account_id": 1000097, |
| 4099 | "name": "Jane Roe", |
| 4100 | "email": "jane.roe@example.com" |
| 4101 | } |
| 4102 | ], |
| 4103 | "values": { |
| 4104 | "-1": "Fails", |
| 4105 | " 0": "No score", |
| 4106 | "+1": "Verified" |
| 4107 | } |
| 4108 | }, |
| 4109 | "Code-Review": { |
| 4110 | "all": [ |
| 4111 | { |
| 4112 | "value": -1, |
| 4113 | "_account_id": 1000096, |
| 4114 | "name": "John Doe", |
| 4115 | "email": "john.doe@example.com" |
| 4116 | }, |
| 4117 | { |
| 4118 | "value": 1, |
| 4119 | "_account_id": 1000097, |
| 4120 | "name": "Jane Roe", |
| 4121 | "email": "jane.roe@example.com" |
| 4122 | } |
| 4123 | ] |
| 4124 | "values": { |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 4125 | "-2": "This shall not be submitted", |
| 4126 | "-1": "I would prefer this is not submitted as is", |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4127 | " 0": "No score", |
| 4128 | "+1": "Looks good to me, but someone else must approve", |
| 4129 | "+2": "Looks good to me, approved" |
| 4130 | } |
| 4131 | } |
| 4132 | }, |
| 4133 | "permitted_labels": { |
| 4134 | "Verified": [ |
| 4135 | "-1", |
| 4136 | " 0", |
| 4137 | "+1" |
| 4138 | ], |
| 4139 | "Code-Review": [ |
| 4140 | "-2", |
| 4141 | "-1", |
| 4142 | " 0", |
| 4143 | "+1", |
| 4144 | "+2" |
| 4145 | ] |
| 4146 | }, |
| 4147 | "removable_reviewers": [ |
| 4148 | { |
| 4149 | "_account_id": 1000096, |
| 4150 | "name": "John Doe", |
| 4151 | "email": "john.doe@example.com" |
| 4152 | }, |
| 4153 | { |
| 4154 | "_account_id": 1000097, |
| 4155 | "name": "Jane Roe", |
| 4156 | "email": "jane.roe@example.com" |
| 4157 | } |
| 4158 | ], |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 4159 | "reviewers": { |
| 4160 | "REVIEWER": [ |
| 4161 | { |
| 4162 | "_account_id": 1000096, |
| 4163 | "name": "John Doe", |
| 4164 | "email": "john.doe@example.com" |
| 4165 | }, |
| 4166 | { |
| 4167 | "_account_id": 1000097, |
| 4168 | "name": "Jane Roe", |
| 4169 | "email": "jane.roe@example.com" |
| 4170 | } |
| 4171 | ] |
| 4172 | }, |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4173 | "current_revision": "674ac754f91e64a0efb8087e59a176484bd534d1", |
| 4174 | "revisions": { |
| 4175 | "674ac754f91e64a0efb8087e59a176484bd534d1": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 4176 | "kind": "REWORK", |
| 4177 | "_number": 2, |
| 4178 | "ref": "refs/changes/65/3965/2", |
| 4179 | "fetch": { |
| 4180 | "http": { |
| 4181 | "url": "http://gerrit/myProject", |
| 4182 | "ref": "refs/changes/65/3965/2" |
| 4183 | } |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 4184 | } |
| 4185 | } |
| 4186 | } |
| 4187 | } |
| 4188 | ---- |
| 4189 | |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 4190 | [[get-related-changes]] |
| 4191 | === Get Related Changes |
| 4192 | -- |
| 4193 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/related' |
| 4194 | -- |
| 4195 | |
| 4196 | Retrieves related changes of a revision. Related changes are changes that either |
| 4197 | depend on, or are dependencies of the revision. |
| 4198 | |
Joerg Zieren | 75e9538 | 2022-07-08 11:30:35 +0200 | [diff] [blame] | 4199 | Additional fields can be obtained by adding `o` parameters. Since these may slow |
| 4200 | down processing they are disabled by default. Currently a single parameter is |
| 4201 | supported: |
| 4202 | |
| 4203 | [[get-related-changes-submittable]] |
| 4204 | -- |
| 4205 | * `SUBMITTABLE`: Compute the `submittable` field in the returned |
| 4206 | link:#related-change-and-commit-info[RelatedChangeAndCommitInfo] entities. |
| 4207 | -- |
| 4208 | |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 4209 | .Request |
| 4210 | ---- |
| 4211 | GET /changes/gerrit~master~I5e4fc08ce34d33c090c9e0bf320de1b17309f774/revisions/b1cb4caa6be46d12b94c25aa68aebabcbb3f53fe/related HTTP/1.0 |
| 4212 | ---- |
| 4213 | |
| 4214 | As result a link:#related-changes-info[RelatedChangesInfo] entity is returned |
| 4215 | describing the related changes. |
| 4216 | |
| 4217 | .Response |
| 4218 | ---- |
| 4219 | HTTP/1.1 200 OK |
| 4220 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4221 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 4222 | |
| 4223 | )]}' |
| 4224 | { |
| 4225 | "changes": [ |
| 4226 | { |
Patrick Hiesel | cab6351 | 2017-07-28 10:25:42 +0200 | [diff] [blame] | 4227 | "project": "gerrit", |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 4228 | "change_id": "Ic62ae3103fca2214904dbf2faf4c861b5f0ae9b5", |
| 4229 | "commit": { |
| 4230 | "commit": "78847477532e386f5a2185a4e8c90b2509e354e3", |
| 4231 | "parents": [ |
| 4232 | { |
| 4233 | "commit": "bb499510bbcdbc9164d96b0dbabb4aa45f59a87e" |
| 4234 | } |
| 4235 | ], |
| 4236 | "author": { |
| 4237 | "name": "David Ostrovsky", |
| 4238 | "email": "david@ostrovsky.org", |
| 4239 | "date": "2014-07-12 15:04:24.000000000", |
| 4240 | "tz": 120 |
| 4241 | }, |
| 4242 | "subject": "Remove Solr" |
| 4243 | }, |
| 4244 | "_change_number": 58478, |
| 4245 | "_revision_number": 2, |
| 4246 | "_current_revision_number": 2 |
Stefan Beller | 3e8bd6e | 2015-06-17 09:46:36 -0700 | [diff] [blame] | 4247 | "status": "NEW" |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 4248 | }, |
| 4249 | { |
Patrick Hiesel | cab6351 | 2017-07-28 10:25:42 +0200 | [diff] [blame] | 4250 | "project": "gerrit", |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 4251 | "change_id": "I5e4fc08ce34d33c090c9e0bf320de1b17309f774", |
| 4252 | "commit": { |
| 4253 | "commit": "b1cb4caa6be46d12b94c25aa68aebabcbb3f53fe", |
| 4254 | "parents": [ |
| 4255 | { |
| 4256 | "commit": "d898f12a9b7a92eb37e7a80636195a1b06417aad" |
| 4257 | } |
| 4258 | ], |
| 4259 | "author": { |
| 4260 | "name": "David Pursehouse", |
| 4261 | "email": "david.pursehouse@sonymobile.com", |
| 4262 | "date": "2014-06-24 02:01:28.000000000", |
| 4263 | "tz": 540 |
| 4264 | }, |
| 4265 | "subject": "Add support for secondary index with Elasticsearch" |
| 4266 | }, |
| 4267 | "_change_number": 58081, |
| 4268 | "_revision_number": 10, |
| 4269 | "_current_revision_number": 10 |
Stefan Beller | 3e8bd6e | 2015-06-17 09:46:36 -0700 | [diff] [blame] | 4270 | "status": "NEW" |
David Pursehouse | 669f251 | 2014-07-18 11:41:42 +0900 | [diff] [blame] | 4271 | } |
| 4272 | ] |
| 4273 | } |
| 4274 | ---- |
| 4275 | |
| 4276 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4277 | [[set-review]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4278 | === Set Review |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4279 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4280 | '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] | 4281 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4282 | |
Logan Hanks | f03040e | 2017-05-03 09:40:56 -0700 | [diff] [blame] | 4283 | Sets a review on a revision, optionally also publishing draft comments, setting |
Logan Hanks | 53c3601 | 2017-06-30 13:47:54 -0700 | [diff] [blame] | 4284 | labels, adding reviewers or CCs, and modifying the work in progress property. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4285 | |
| 4286 | The review must be provided in the request body as a |
| 4287 | link:#review-input[ReviewInput] entity. |
| 4288 | |
Youssef Elghareeb | 12add16 | 2019-12-18 18:43:23 +0100 | [diff] [blame] | 4289 | If the labels are set, the user sending the request will automatically be |
| 4290 | added as a reviewer, otherwise (if they only commented) they are added to |
| 4291 | the CC list. |
| 4292 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 4293 | Some updates to the attention set occur here. If more than one update should |
| 4294 | occur, only the first update in the order of the below documentation occurs: |
| 4295 | |
| 4296 | If a user is part of remove_from_attention_set, the user will be explicitly |
| 4297 | removed from the attention set. |
| 4298 | |
| 4299 | If a user is part of add_to_attention_set, the user will be explicitly |
| 4300 | added to the attention set. |
| 4301 | |
| 4302 | If the boolean ignore_default_attention_set_rules is set to true, all |
| 4303 | other rules below will be ignored: |
| 4304 | |
| 4305 | The user who created the review is removed from the attention set. |
| 4306 | |
| 4307 | If the change is ready for review, the following also apply: |
| 4308 | |
| 4309 | When the uploader replies, the owner is added to the attention set. |
| 4310 | |
| 4311 | When the owner or uploader replies, all the reviewers are added to |
| 4312 | the attention set. |
| 4313 | |
| 4314 | When neither the owner nor the uploader replies, add the owner and the |
| 4315 | uploader to the attention set. |
| 4316 | |
| 4317 | Then, new reviewers are added to the attention set, and removed reviewers |
| 4318 | (by becoming CC) are removed from the attention set. |
| 4319 | |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4320 | A review cannot be set on a change edit. Trying to post a review for a |
| 4321 | change edit fails with `409 Conflict`. |
| 4322 | |
Logan Hanks | f03040e | 2017-05-03 09:40:56 -0700 | [diff] [blame] | 4323 | Here is an example of using this method to set labels: |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4324 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4325 | .Request |
| 4326 | ---- |
| 4327 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/review HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4328 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4329 | |
| 4330 | { |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 4331 | "tag": "jenkins", |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4332 | "message": "Some nits need to be fixed.", |
| 4333 | "labels": { |
| 4334 | "Code-Review": -1 |
| 4335 | }, |
| 4336 | "comments": { |
| 4337 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 4338 | { |
| 4339 | "line": 23, |
| 4340 | "message": "[nit] trailing whitespace" |
| 4341 | }, |
| 4342 | { |
| 4343 | "line": 49, |
| 4344 | "message": "[nit] s/conrtol/control" |
David Pursehouse | b53c1f6 | 2014-08-26 14:51:33 +0900 | [diff] [blame] | 4345 | }, |
| 4346 | { |
| 4347 | "range": { |
| 4348 | "start_line": 50, |
| 4349 | "start_character": 0, |
| 4350 | "end_line": 55, |
| 4351 | "end_character": 20 |
| 4352 | }, |
David Pursehouse | b53c1f6 | 2014-08-26 14:51:33 +0900 | [diff] [blame] | 4353 | "message": "Incorrect indentation" |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4354 | } |
| 4355 | ] |
| 4356 | } |
| 4357 | } |
| 4358 | ---- |
| 4359 | |
Aaron Gable | 843b0c1 | 2017-04-21 08:25:27 -0700 | [diff] [blame] | 4360 | As response a link:#review-result[ReviewResult] entity is returned that |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4361 | describes the applied labels and any added reviewers (e.g. yourself, |
| 4362 | if you set a label but weren't previously a reviewer on this CL). |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4363 | |
| 4364 | .Response |
| 4365 | ---- |
| 4366 | HTTP/1.1 200 OK |
| 4367 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4368 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 4369 | |
| 4370 | )]}' |
| 4371 | { |
| 4372 | "labels": { |
| 4373 | "Code-Review": -1 |
| 4374 | } |
| 4375 | } |
| 4376 | ---- |
| 4377 | |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4378 | It is also possible to add one or more reviewers or CCs |
Logan Hanks | f03040e | 2017-05-03 09:40:56 -0700 | [diff] [blame] | 4379 | to a change simultaneously with a review: |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4380 | |
| 4381 | .Request |
| 4382 | ---- |
| 4383 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/review HTTP/1.0 |
| 4384 | Content-Type: application/json; charset=UTF-8 |
| 4385 | |
| 4386 | { |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4387 | "message": "I don't have context here. Jane and maybe John and the project leads should take a look.", |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4388 | "reviewers": [ |
| 4389 | { |
| 4390 | "reviewer": "jane.roe@example.com" |
| 4391 | }, |
| 4392 | { |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4393 | "reviewer": "john.doe@example.com", |
| 4394 | "state": "CC" |
| 4395 | } |
| 4396 | { |
| 4397 | "reviewer": "MyProjectVerifiers", |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4398 | } |
| 4399 | ] |
| 4400 | } |
| 4401 | ---- |
| 4402 | |
| 4403 | Each element of the `reviewers` list is an instance of |
| 4404 | link:#reviewer-input[ReviewerInput]. The corresponding result of |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4405 | adding each reviewer will be returned in a map of inputs to |
Gal Paikin | 721a40b | 2021-04-15 09:30:00 +0200 | [diff] [blame] | 4406 | link:#reviewer-result[ReviewerResult]s. |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4407 | |
| 4408 | .Response |
| 4409 | ---- |
| 4410 | HTTP/1.1 200 OK |
| 4411 | Content-Disposition: attachment |
| 4412 | Content-Type: application/json; charset=UTF-8 |
| 4413 | |
| 4414 | )]}' |
| 4415 | { |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4416 | "reviewers": { |
| 4417 | "jane.roe@example.com": { |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4418 | "input": "jane.roe@example.com", |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4419 | "reviewers": [ |
| 4420 | { |
| 4421 | "_account_id": 1000097, |
| 4422 | "name": "Jane Roe", |
| 4423 | "email": "jane.roe@example.com" |
| 4424 | "approvals": { |
| 4425 | "Verified": " 0", |
| 4426 | "Code-Review": " 0" |
| 4427 | }, |
| 4428 | }, |
| 4429 | ] |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4430 | }, |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4431 | "john.doe@example.com": { |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4432 | "input": "john.doe@example.com", |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4433 | "ccs": [ |
| 4434 | { |
| 4435 | "_account_id": 1000096, |
| 4436 | "name": "John Doe", |
| 4437 | "email": "john.doe@example.com" |
| 4438 | "approvals": { |
| 4439 | "Verified": " 0", |
| 4440 | "Code-Review": " 0" |
| 4441 | }, |
| 4442 | } |
| 4443 | ] |
| 4444 | }, |
| 4445 | "MyProjectVerifiers": { |
| 4446 | "input": "MyProjectVerifiers", |
| 4447 | "reviewers": [ |
| 4448 | { |
| 4449 | "_account_id": 1000098, |
| 4450 | "name": "Alice Ansel", |
| 4451 | "email": "alice.ansel@example.com" |
| 4452 | "approvals": { |
| 4453 | "Verified": " 0", |
| 4454 | "Code-Review": " 0" |
| 4455 | }, |
| 4456 | }, |
| 4457 | { |
| 4458 | "_account_id": 1000099, |
| 4459 | "name": "Bob Bollard", |
| 4460 | "email": "bob.bollard@example.com" |
| 4461 | "approvals": { |
| 4462 | "Verified": " 0", |
| 4463 | "Code-Review": " 0" |
| 4464 | }, |
| 4465 | }, |
| 4466 | ] |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4467 | } |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4468 | } |
Logan Hanks | 5f1c759 | 2016-07-06 14:39:33 -0700 | [diff] [blame] | 4469 | } |
| 4470 | ---- |
| 4471 | |
Logan Hanks | e2aacef | 2016-07-22 15:54:52 -0700 | [diff] [blame] | 4472 | If there are any errors returned for reviewers, the entire review request will |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4473 | be rejected with `400 Bad Request`. None of the entries will have the |
| 4474 | `reviewers` or `ccs` field set, and those which specifically failed will have |
| 4475 | the `errors` field set containing details of why they failed. |
Logan Hanks | e2aacef | 2016-07-22 15:54:52 -0700 | [diff] [blame] | 4476 | |
| 4477 | .Error Response |
| 4478 | ---- |
| 4479 | HTTP/1.1 400 Bad Request |
| 4480 | Content-Disposition: attachment |
| 4481 | Content-Type: application/json; charset=UTF-8 |
| 4482 | |
| 4483 | )]}' |
| 4484 | { |
| 4485 | "reviewers": { |
Aaron Gable | 8c65021 | 2017-04-25 12:03:37 -0700 | [diff] [blame] | 4486 | "jane.roe@example.com": { |
| 4487 | "input": "jane.roe@example.com", |
| 4488 | "error": "Account of jane.roe@example.com is inactive." |
| 4489 | }, |
| 4490 | "john.doe@example.com": { |
| 4491 | "input": "john.doe@example.com" |
| 4492 | }, |
Logan Hanks | e2aacef | 2016-07-22 15:54:52 -0700 | [diff] [blame] | 4493 | "MyProjectVerifiers": { |
| 4494 | "input": "MyProjectVerifiers", |
| 4495 | "error": "The group My Group has 15 members. Do you want to add them all as reviewers?", |
| 4496 | "confirm": true |
| 4497 | } |
| 4498 | } |
| 4499 | } |
| 4500 | ---- |
| 4501 | |
Dave Borowitz | d2e4145 | 2017-10-26 08:06:23 -0400 | [diff] [blame] | 4502 | [[set-review-notifications]] |
Logan Hanks | fc05596 | 2017-06-12 14:20:53 -0700 | [diff] [blame] | 4503 | .Notifications |
| 4504 | |
| 4505 | An email will be sent using the "comment" template. |
| 4506 | |
| 4507 | If the top-level notify property is null or not set, then notification behavior |
| 4508 | depends on whether the change is WIP, whether it has started review, and whether |
| 4509 | the tag property is null. |
| 4510 | |
| 4511 | NOTE: If adding reviewers, the notify property of each ReviewerInput is *ignored*. |
| 4512 | Use the notify property of the top-level link:#review-input[ReviewInput] instead. |
| 4513 | |
| 4514 | For the purposes of this table, *everyone* means *owner, reviewers, CCs, stars, and ALL_COMMENTS |
| 4515 | watchers*. |
| 4516 | |
Logan Hanks | ea3e3b7 | 2017-06-12 14:21:47 -0700 | [diff] [blame] | 4517 | [options="header",cols="2,1,1,2,2"] |
Logan Hanks | fc05596 | 2017-06-12 14:20:53 -0700 | [diff] [blame] | 4518 | |============================= |
Logan Hanks | ea3e3b7 | 2017-06-12 14:21:47 -0700 | [diff] [blame] | 4519 | |WIP State |Review Started|Tag Given|Default |notify=ALL |
| 4520 | |Ready for review|N/A |N/A |everyone|everyone |
| 4521 | |Work in progress|no |no |not sent|everyone |
| 4522 | |Work in progress|no |yes |owner |everyone |
| 4523 | |Work in progress|yes |no |everyone|everyone |
| 4524 | |Work in progress|yes |yes |owner |everyone |
| 4525 | |
Logan Hanks | fc05596 | 2017-06-12 14:20:53 -0700 | [diff] [blame] | 4526 | |============================= |
| 4527 | |
| 4528 | If reviewers are added, then a second email will be sent using the "newchange" |
| 4529 | template. The notification logic for this email is the same as for |
| 4530 | link:#add-reviewer[Add Reviewer]. |
| 4531 | |
Logan Hanks | ea3e3b7 | 2017-06-12 14:21:47 -0700 | [diff] [blame] | 4532 | [options="header",cols="1,1,1"] |
Logan Hanks | fc05596 | 2017-06-12 14:20:53 -0700 | [diff] [blame] | 4533 | |============================= |
Logan Hanks | ea3e3b7 | 2017-06-12 14:21:47 -0700 | [diff] [blame] | 4534 | |WIP State |Default |notify=ALL |
| 4535 | |Ready for review|owner, reviewers, CCs|owner, reviewers, CCs |
| 4536 | |Work in progress|not sent |owner, reviewers, CCs |
Logan Hanks | fc05596 | 2017-06-12 14:20:53 -0700 | [diff] [blame] | 4537 | |============================= |
| 4538 | |
| 4539 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4540 | [[rebase-revision]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4541 | === Rebase Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4542 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4543 | '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] | 4544 | -- |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4545 | |
| 4546 | Rebases a revision. |
| 4547 | |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 4548 | Optionally, the parent revision can be changed to another patch set through the |
| 4549 | link:#rebase-input[RebaseInput] entity. |
| 4550 | |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4551 | .Request |
| 4552 | ---- |
| 4553 | POST /changes/myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/rebase HTTP/1.0 |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 4554 | Content-Type: application/json;charset=UTF-8 |
| 4555 | |
| 4556 | { |
| 4557 | "base" : "1234", |
| 4558 | } |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4559 | ---- |
| 4560 | |
| 4561 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 4562 | describes the rebased change. Information about the current patch set |
| 4563 | is included. |
| 4564 | |
| 4565 | .Response |
| 4566 | ---- |
| 4567 | HTTP/1.1 200 OK |
| 4568 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4569 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4570 | |
| 4571 | )]}' |
| 4572 | { |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4573 | "id": "myProject~master~I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 4574 | "project": "myProject", |
| 4575 | "branch": "master", |
| 4576 | "change_id": "I3ea943139cb62e86071996f2480e58bf3eeb9dd2", |
| 4577 | "subject": "Implement Feature X", |
| 4578 | "status": "NEW", |
| 4579 | "created": "2013-02-01 09:59:32.126000000", |
| 4580 | "updated": "2013-02-21 11:16:36.775000000", |
| 4581 | "mergeable": false, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 4582 | "insertions": 21, |
| 4583 | "deletions": 21, |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4584 | "_number": 4799, |
| 4585 | "owner": { |
| 4586 | "name": "John Doe" |
| 4587 | }, |
| 4588 | "current_revision": "27cc4558b5a3d3387dd11ee2df7a117e7e581822", |
| 4589 | "revisions": { |
| 4590 | "27cc4558b5a3d3387dd11ee2df7a117e7e581822": { |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 4591 | "kind": "REWORK", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4592 | "_number": 2, |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 4593 | "ref": "refs/changes/99/4799/2", |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4594 | "fetch": { |
| 4595 | "http": { |
| 4596 | "url": "http://gerrit:8080/myProject", |
| 4597 | "ref": "refs/changes/99/4799/2" |
| 4598 | } |
| 4599 | }, |
| 4600 | "commit": { |
| 4601 | "parents": [ |
| 4602 | { |
| 4603 | "commit": "b4003890dadd406d80222bf1ad8aca09a4876b70", |
| 4604 | "subject": "Implement Feature A" |
| 4605 | } |
Yuxuan Wang | cc598ac | 2016-07-12 17:11:05 +0000 | [diff] [blame] | 4606 | ], |
| 4607 | "author": { |
| 4608 | "name": "John Doe", |
| 4609 | "email": "john.doe@example.com", |
| 4610 | "date": "2013-05-07 15:21:27.000000000", |
| 4611 | "tz": 120 |
| 4612 | }, |
| 4613 | "committer": { |
| 4614 | "name": "Gerrit Code Review", |
| 4615 | "email": "gerrit-server@example.com", |
| 4616 | "date": "2013-05-07 15:35:43.000000000", |
| 4617 | "tz": 120 |
| 4618 | }, |
| 4619 | "subject": "Implement Feature X", |
| 4620 | "message": "Implement Feature X\n\nAdded feature X." |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4621 | } |
| 4622 | } |
| 4623 | } |
| 4624 | ---- |
| 4625 | |
| 4626 | If the revision cannot be rebased, e.g. due to conflicts, the response is |
| 4627 | "`409 Conflict`" and the error message is contained in the response |
| 4628 | body. |
| 4629 | |
| 4630 | .Response |
| 4631 | ---- |
| 4632 | HTTP/1.1 409 Conflict |
| 4633 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4634 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | cdae63b | 2013-03-15 15:06:59 +0100 | [diff] [blame] | 4635 | |
| 4636 | The change could not be rebased due to a path conflict during merge. |
| 4637 | ---- |
| 4638 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 4639 | [[submit-revision]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4640 | === Submit Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4641 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4642 | '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] | 4643 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4644 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 4645 | Submits a revision. |
Gal Paikin | c85d352 | 2021-04-19 13:34:54 +0200 | [diff] [blame] | 4646 | Submitting a change also removes all users from the link:#attention-set[attention set]. |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 4647 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 4648 | .Request |
| 4649 | ---- |
| 4650 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/submit HTTP/1.0 |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 4651 | ---- |
| 4652 | |
Gal Paikin | 3d6cdec | 2021-04-19 13:32:13 +0200 | [diff] [blame] | 4653 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 4654 | describes the submitted/merged change. |
| 4655 | |
Gal Paikin | e2849a8 | 2021-04-19 13:41:10 +0200 | [diff] [blame] | 4656 | Submission may submit multiple changes, but we still only return one ChangeInfo |
| 4657 | object. To query for all submitted changes, please use the submission_id that is |
| 4658 | part of the response. |
| 4659 | |
| 4660 | Changes that will also be submitted: |
| 4661 | 1. All changes of the same topic if |
| 4662 | link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] |
| 4663 | configuration is set to true. |
| 4664 | 2. All dependent changes. |
| 4665 | 3. The closure of the above (e.g if a dependent change has a topic, all changes |
| 4666 | of *that* topic will also be submitted). |
| 4667 | |
Gal Paikin | 3d6cdec | 2021-04-19 13:32:13 +0200 | [diff] [blame] | 4668 | .Response |
| 4669 | ---- |
| 4670 | HTTP/1.1 200 OK |
| 4671 | Content-Disposition: attachment |
| 4672 | Content-Type: application/json; charset=UTF-8 |
| 4673 | |
| 4674 | )]}' |
| 4675 | { |
| 4676 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 4677 | "project": "myProject", |
| 4678 | "branch": "master", |
| 4679 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 4680 | "subject": "Implementing Feature X", |
| 4681 | "status": "MERGED", |
| 4682 | "created": "2013-02-01 09:59:32.126000000", |
| 4683 | "updated": "2013-02-21 11:16:36.775000000", |
| 4684 | "submitted": "2013-02-21 11:16:36.615000000", |
| 4685 | "_number": 3965, |
| 4686 | "owner": { |
| 4687 | "name": "John Doe" |
| 4688 | } |
| 4689 | } |
| 4690 | ---- |
| 4691 | |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 4692 | If the revision cannot be submitted, e.g. because the submit rule |
| 4693 | doesn't allow submitting the revision or the revision is not the |
| 4694 | current revision, the response is "`409 Conflict`" and the error |
| 4695 | message is contained in the response body. |
| 4696 | |
| 4697 | .Response |
| 4698 | ---- |
| 4699 | HTTP/1.1 409 Conflict |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4700 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | 14b5811 | 2013-02-26 16:30:19 +0100 | [diff] [blame] | 4701 | |
| 4702 | "revision 674ac754f91e64a0efb8087e59a176484bd534d1 is not current revision" |
| 4703 | ---- |
| 4704 | |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 4705 | [[get-patch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4706 | === Get Patch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4707 | -- |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 4708 | '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] | 4709 | -- |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 4710 | |
| 4711 | Gets the formatted patch for one revision. |
| 4712 | |
| 4713 | .Request |
| 4714 | ---- |
| 4715 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/patch HTTP/1.0 |
| 4716 | ---- |
| 4717 | |
Shawn Pearce | 98361f7 | 2013-05-10 16:27:36 -0700 | [diff] [blame] | 4718 | The formatted patch is returned as text encoded inside base64: |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 4719 | |
| 4720 | .Response |
| 4721 | ---- |
| 4722 | HTTP/1.1 200 OK |
| 4723 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4724 | Content-Type: text/plain; charset=ISO-8859-1 |
Shawn Pearce | 98361f7 | 2013-05-10 16:27:36 -0700 | [diff] [blame] | 4725 | X-FYI-Content-Encoding: base64 |
| 4726 | X-FYI-Content-Type: application/mbox |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 4727 | |
Shawn Pearce | 98361f7 | 2013-05-10 16:27:36 -0700 | [diff] [blame] | 4728 | RnJvbSA3ZGFkY2MxNTNmZGVhMTdhYTg0ZmYzMmE2ZTI0NWRiYjY... |
Edwin Kempin | 257d70f | 2013-03-28 14:31:14 +0100 | [diff] [blame] | 4729 | ---- |
| 4730 | |
David Ostrovsky | 973f38b | 2013-08-22 00:24:51 -0700 | [diff] [blame] | 4731 | Adding query parameter `zip` (for example `/changes/.../patch?zip`) |
| 4732 | returns the patch as a single file inside of a ZIP archive. Clients |
| 4733 | can expand the ZIP to obtain the plain text patch, avoiding the |
| 4734 | need for a base64 decoding step. This option implies `download`. |
| 4735 | |
| 4736 | Query parameter `download` (e.g. `/changes/.../patch?download`) |
| 4737 | will suggest the browser save the patch as `commitsha1.diff.base64`, |
| 4738 | for later processing by command line tools. |
| 4739 | |
Kasper Nilsson | 8144807 | 2016-10-17 15:04:33 -0700 | [diff] [blame] | 4740 | If the `path` parameter is set, the returned content is a diff of the single |
| 4741 | file that the path refers to. |
| 4742 | |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 4743 | [[get-mergeable]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4744 | === Get Mergeable |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4745 | -- |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 4746 | '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] | 4747 | -- |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 4748 | |
| 4749 | Gets the method the server will use to submit (merge) the change and |
| 4750 | an indicator if the change is currently mergeable. |
| 4751 | |
| 4752 | .Request |
| 4753 | ---- |
| 4754 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/mergeable HTTP/1.0 |
| 4755 | ---- |
| 4756 | |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 4757 | As response a link:#mergeable-info[MergeableInfo] entity is returned. |
| 4758 | |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 4759 | .Response |
| 4760 | ---- |
| 4761 | HTTP/1.1 200 OK |
| 4762 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4763 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 4764 | |
| 4765 | )]}' |
| 4766 | { |
| 4767 | submit_type: "MERGE_IF_NECESSARY", |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 4768 | strategy: "recursive", |
| 4769 | mergeable: true |
Shawn Pearce | 3a2a247 | 2013-07-17 16:40:45 -0700 | [diff] [blame] | 4770 | } |
| 4771 | ---- |
| 4772 | |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 4773 | If the `other-branches` parameter is specified, the mergeability will also be |
Zhen Chen | 6729b63 | 2016-11-11 17:32:32 -0800 | [diff] [blame] | 4774 | checked for all other branches which are listed in the |
| 4775 | link:config-project-config.html#branchOrder-section[branchOrder] section in the |
| 4776 | project.config file. |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 4777 | |
| 4778 | .Request |
| 4779 | ---- |
| 4780 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/mergeable?other-branches HTTP/1.0 |
| 4781 | ---- |
| 4782 | |
| 4783 | The response will then contain a list of all other branches where this changes |
| 4784 | could merge cleanly. |
| 4785 | |
| 4786 | .Response |
| 4787 | ---- |
| 4788 | HTTP/1.1 200 OK |
| 4789 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4790 | Content-Type: application/json; charset=UTF-8 |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 4791 | |
| 4792 | )]}' |
| 4793 | { |
| 4794 | submit_type: "MERGE_IF_NECESSARY", |
| 4795 | mergeable: true, |
| 4796 | mergeable_into: [ |
| 4797 | "refs/heads/stable-2.7", |
| 4798 | "refs/heads/stable-2.8", |
| 4799 | ] |
| 4800 | } |
| 4801 | ---- |
| 4802 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4803 | [[get-submit-type]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4804 | === Get Submit Type |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4805 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4806 | '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] | 4807 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4808 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4809 | Gets the method the server will use to submit (merge) the change. |
| 4810 | |
| 4811 | .Request |
| 4812 | ---- |
| 4813 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/submit_type HTTP/1.0 |
| 4814 | ---- |
| 4815 | |
| 4816 | .Response |
| 4817 | ---- |
| 4818 | HTTP/1.1 200 OK |
| 4819 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4820 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4821 | |
| 4822 | )]}' |
| 4823 | "MERGE_IF_NECESSARY" |
| 4824 | ---- |
| 4825 | |
| 4826 | [[test-submit-type]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4827 | === Test Submit Type |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4828 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4829 | '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] | 4830 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4831 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4832 | Tests the submit_type Prolog rule in the project, or the one given. |
| 4833 | |
| 4834 | Request body may be either the Prolog code as `text/plain` or a |
| 4835 | link:#rule-input[RuleInput] object. The query parameter `filters` |
| 4836 | may be set to `SKIP` to bypass parent project filters while testing |
| 4837 | a project-specific rule. |
| 4838 | |
| 4839 | .Request |
| 4840 | ---- |
| 4841 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/test.submit_type HTTP/1.0 |
David Pursehouse | 4d7f991 | 2020-06-18 13:02:56 +0900 | [diff] [blame] | 4842 | Content-Type: text/plain; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4843 | |
| 4844 | submit_type(cherry_pick). |
| 4845 | ---- |
| 4846 | |
| 4847 | .Response |
| 4848 | ---- |
| 4849 | HTTP/1.1 200 OK |
| 4850 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4851 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4852 | |
| 4853 | )]}' |
Shawn Pearce | 7076f4e | 2013-08-20 22:11:51 -0700 | [diff] [blame] | 4854 | "CHERRY_PICK" |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4855 | ---- |
| 4856 | |
| 4857 | [[test-submit-rule]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4858 | === Test Submit Rule |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4859 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4860 | '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] | 4861 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4862 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4863 | Tests the submit_rule Prolog rule in the project, or the one given. |
| 4864 | |
| 4865 | Request body may be either the Prolog code as `text/plain` or a |
| 4866 | link:#rule-input[RuleInput] object. The query parameter `filters` |
| 4867 | may be set to `SKIP` to bypass parent project filters while testing |
| 4868 | a project-specific rule. |
| 4869 | |
| 4870 | .Request |
| 4871 | ---- |
Shawn Pearce | a3cce71 | 2014-03-21 08:16:11 -0700 | [diff] [blame] | 4872 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/test.submit_rule?filters=SKIP HTTP/1.0 |
David Pursehouse | 4d7f991 | 2020-06-18 13:02:56 +0900 | [diff] [blame] | 4873 | Content-Type: text/plain; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4874 | |
| 4875 | submit_rule(submit(R)) :- |
| 4876 | R = label('Any-Label-Name', reject(_)). |
| 4877 | ---- |
| 4878 | |
Patrick Hiesel | 7ab1b18 | 2019-08-13 15:29:27 +0200 | [diff] [blame] | 4879 | The response is a link:#submit-record[SubmitRecord] describing the |
| 4880 | permutations that satisfy the tested submit rule. |
| 4881 | |
David Pursehouse | 87a3fb0 | 2019-10-29 16:01:27 +0900 | [diff] [blame] | 4882 | If the submit rule was a no-op, the response is "`204 No Content`". |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4883 | |
| 4884 | .Response |
| 4885 | ---- |
| 4886 | HTTP/1.1 200 OK |
| 4887 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4888 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4889 | |
| 4890 | )]}' |
Patrick Hiesel | 7ab1b18 | 2019-08-13 15:29:27 +0200 | [diff] [blame] | 4891 | { |
| 4892 | "status": "NOT_READY", |
| 4893 | "reject": { |
| 4894 | "Any-Label-Name": {} |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4895 | } |
Patrick Hiesel | 7ab1b18 | 2019-08-13 15:29:27 +0200 | [diff] [blame] | 4896 | } |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 4897 | ---- |
| 4898 | |
Shawn Pearce | b42e303 | 2015-04-02 10:28:10 -0700 | [diff] [blame] | 4899 | When testing with the `curl` command line client the |
| 4900 | `--data-binary @rules.pl` flag should be used to ensure |
| 4901 | all LFs are included in the Prolog code: |
| 4902 | |
| 4903 | ---- |
| 4904 | curl -X POST \ |
| 4905 | -H 'Content-Type: text/plain; charset=UTF-8' \ |
| 4906 | --data-binary @rules.pl \ |
| 4907 | http://.../test.submit_rule |
| 4908 | ---- |
| 4909 | |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 4910 | [[list-drafts]] |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 4911 | === List Revision Drafts |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4912 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4913 | '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] | 4914 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4915 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 4916 | Lists the draft comments of a revision that belong to the calling |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 4917 | user. |
| 4918 | |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 4919 | Returns a map of file paths to lists of link:#comment-info[CommentInfo] |
| 4920 | entries. The entries in the map are sorted by file path. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 4921 | |
| 4922 | .Request |
| 4923 | ---- |
| 4924 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/ HTTP/1.0 |
| 4925 | ---- |
| 4926 | |
| 4927 | .Response |
| 4928 | ---- |
| 4929 | HTTP/1.1 200 OK |
| 4930 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4931 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 4932 | |
| 4933 | )]}' |
| 4934 | { |
| 4935 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 4936 | { |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 4937 | "id": "TvcXrmjM", |
| 4938 | "line": 23, |
| 4939 | "message": "[nit] trailing whitespace", |
| 4940 | "updated": "2013-02-26 15:40:43.986000000" |
| 4941 | }, |
| 4942 | { |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 4943 | "id": "TveXwFiA", |
| 4944 | "line": 49, |
| 4945 | "in_reply_to": "TfYX-Iuo", |
| 4946 | "message": "Done", |
| 4947 | "updated": "2013-02-26 15:40:45.328000000" |
| 4948 | } |
| 4949 | ] |
| 4950 | } |
| 4951 | ---- |
| 4952 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 4953 | [[create-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4954 | === Create Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4955 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4956 | '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] | 4957 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4958 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 4959 | Creates a draft comment on a revision. |
| 4960 | |
| 4961 | The new draft comment must be provided in the request body inside a |
| 4962 | link:#comment-input[CommentInput] entity. |
| 4963 | |
| 4964 | .Request |
| 4965 | ---- |
| 4966 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4967 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 4968 | |
| 4969 | { |
| 4970 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4971 | "line": 23, |
| 4972 | "message": "[nit] trailing whitespace" |
| 4973 | } |
| 4974 | ---- |
| 4975 | |
| 4976 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 4977 | describes the draft comment. |
| 4978 | |
| 4979 | .Response |
| 4980 | ---- |
| 4981 | HTTP/1.1 200 OK |
| 4982 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 4983 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 4984 | |
| 4985 | )]}' |
| 4986 | { |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 4987 | "id": "TvcXrmjM", |
| 4988 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 4989 | "line": 23, |
| 4990 | "message": "[nit] trailing whitespace", |
| 4991 | "updated": "2013-02-26 15:40:43.986000000" |
| 4992 | } |
| 4993 | ---- |
| 4994 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 4995 | [[get-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4996 | === Get Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 4997 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 4998 | '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] | 4999 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 5000 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 5001 | Retrieves a draft comment of a revision that belongs to the calling |
| 5002 | user. |
| 5003 | |
| 5004 | .Request |
| 5005 | ---- |
| 5006 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/TvcXrmjM HTTP/1.0 |
| 5007 | ---- |
| 5008 | |
| 5009 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 5010 | describes the draft comment. |
| 5011 | |
| 5012 | .Response |
| 5013 | ---- |
| 5014 | HTTP/1.1 200 OK |
| 5015 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5016 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 5017 | |
| 5018 | )]}' |
| 5019 | { |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 5020 | "id": "TvcXrmjM", |
| 5021 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 5022 | "line": 23, |
| 5023 | "message": "[nit] trailing whitespace", |
| 5024 | "updated": "2013-02-26 15:40:43.986000000" |
| 5025 | } |
| 5026 | ---- |
| 5027 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5028 | [[update-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5029 | === Update Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5030 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 5031 | '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] | 5032 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 5033 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5034 | Updates a draft comment on a revision. |
| 5035 | |
| 5036 | The new draft comment must be provided in the request body inside a |
| 5037 | link:#comment-input[CommentInput] entity. |
| 5038 | |
| 5039 | .Request |
| 5040 | ---- |
| 5041 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/TvcXrmjM HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5042 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5043 | |
| 5044 | { |
| 5045 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 5046 | "line": 23, |
| 5047 | "message": "[nit] trailing whitespace" |
| 5048 | } |
| 5049 | ---- |
| 5050 | |
| 5051 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 5052 | describes the draft comment. |
| 5053 | |
| 5054 | .Response |
| 5055 | ---- |
| 5056 | HTTP/1.1 200 OK |
| 5057 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5058 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5059 | |
| 5060 | )]}' |
| 5061 | { |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5062 | "id": "TvcXrmjM", |
| 5063 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 5064 | "line": 23, |
| 5065 | "message": "[nit] trailing whitespace", |
| 5066 | "updated": "2013-02-26 15:40:43.986000000" |
| 5067 | } |
| 5068 | ---- |
| 5069 | |
| 5070 | [[delete-draft]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5071 | === Delete Draft |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5072 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 5073 | '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] | 5074 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 5075 | |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 5076 | Deletes a draft comment from a revision. |
| 5077 | |
| 5078 | .Request |
| 5079 | ---- |
| 5080 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/drafts/TvcXrmjM HTTP/1.0 |
| 5081 | ---- |
| 5082 | |
| 5083 | .Response |
| 5084 | ---- |
| 5085 | HTTP/1.1 204 No Content |
| 5086 | ---- |
| 5087 | |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5088 | [[list-comments]] |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 5089 | === List Revision Comments |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5090 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5091 | '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] | 5092 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5093 | |
| 5094 | Lists the published comments of a revision. |
| 5095 | |
| 5096 | As result a map is returned that maps the file path to a list of |
| 5097 | link:#comment-info[CommentInfo] entries. The entries in the map are |
Khai Do | 23845a1 | 2014-06-02 11:28:16 -0700 | [diff] [blame] | 5098 | sorted by file path and only include file (or inline) comments. Use |
| 5099 | the link:#get-change-detail[Get Change Detail] endpoint to retrieve |
| 5100 | the general change message (or comment). |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5101 | |
| 5102 | .Request |
| 5103 | ---- |
| 5104 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/comments/ HTTP/1.0 |
| 5105 | ---- |
| 5106 | |
| 5107 | .Response |
| 5108 | ---- |
| 5109 | HTTP/1.1 200 OK |
| 5110 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5111 | Content-Type: application/json; charset=UTF-8 |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5112 | |
| 5113 | )]}' |
| 5114 | { |
| 5115 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 5116 | { |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5117 | "id": "TvcXrmjM", |
| 5118 | "line": 23, |
| 5119 | "message": "[nit] trailing whitespace", |
| 5120 | "updated": "2013-02-26 15:40:43.986000000", |
| 5121 | "author": { |
| 5122 | "_account_id": 1000096, |
| 5123 | "name": "John Doe", |
| 5124 | "email": "john.doe@example.com" |
| 5125 | } |
| 5126 | }, |
| 5127 | { |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5128 | "id": "TveXwFiA", |
| 5129 | "line": 49, |
| 5130 | "in_reply_to": "TfYX-Iuo", |
| 5131 | "message": "Done", |
| 5132 | "updated": "2013-02-26 15:40:45.328000000", |
| 5133 | "author": { |
| 5134 | "_account_id": 1000097, |
| 5135 | "name": "Jane Roe", |
| 5136 | "email": "jane.roe@example.com" |
| 5137 | } |
| 5138 | } |
| 5139 | ] |
| 5140 | } |
| 5141 | ---- |
| 5142 | |
| 5143 | [[get-comment]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5144 | === Get Comment |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5145 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5146 | '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] | 5147 | -- |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5148 | |
| 5149 | Retrieves a published comment of a revision. |
| 5150 | |
| 5151 | .Request |
| 5152 | ---- |
| 5153 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/comments/TvcXrmjM HTTP/1.0 |
| 5154 | ---- |
| 5155 | |
| 5156 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 5157 | describes the published comment. |
| 5158 | |
| 5159 | .Response |
| 5160 | ---- |
| 5161 | HTTP/1.1 200 OK |
| 5162 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5163 | Content-Type: application/json; charset=UTF-8 |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5164 | |
| 5165 | )]}' |
| 5166 | { |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 5167 | "id": "TvcXrmjM", |
| 5168 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 5169 | "line": 23, |
| 5170 | "message": "[nit] trailing whitespace", |
| 5171 | "updated": "2013-02-26 15:40:43.986000000", |
| 5172 | "author": { |
| 5173 | "_account_id": 1000096, |
| 5174 | "name": "John Doe", |
| 5175 | "email": "john.doe@example.com" |
| 5176 | } |
| 5177 | } |
| 5178 | ---- |
| 5179 | |
Changcheng Xiao | e5b14ce | 2017-02-10 09:39:48 +0100 | [diff] [blame] | 5180 | [[delete-comment]] |
| 5181 | === Delete Comment |
| 5182 | -- |
| 5183 | 'DELETE /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/comments/link:#comment-id[\{comment-id\}]' + |
| 5184 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/comments/link:#comment-id[\{comment-id\}]/delete' |
| 5185 | -- |
| 5186 | |
| 5187 | Deletes a published comment of a revision. Instead of deleting the |
| 5188 | whole comment, this endpoint just replaces the comment's message |
| 5189 | with a new message, which contains the name of the user who deletes |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 5190 | the comment and the reason why it's deleted. |
Changcheng Xiao | e5b14ce | 2017-02-10 09:39:48 +0100 | [diff] [blame] | 5191 | |
Gal Paikin | 8d02723 | 2021-12-09 12:39:19 +0100 | [diff] [blame] | 5192 | This endpoint also marks the comment as resolved since deleted comments are not |
| 5193 | actionable. |
| 5194 | |
Changcheng Xiao | e5b14ce | 2017-02-10 09:39:48 +0100 | [diff] [blame] | 5195 | Note that only users with the |
| 5196 | link:access-control.html#capability_administrateServer[Administrate Server] |
| 5197 | global capability are permitted to delete a comment. |
| 5198 | |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 5199 | Deletion reason can be provided in the request body as a |
| 5200 | link:#delete-comment-input[DeleteCommentInput] entity. |
| 5201 | Historically, this method allowed a body in the DELETE, but that behavior is |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 5202 | link:https://www.gerritcodereview.com/releases/2.16.md[deprecated,role=external,window=_blank]. |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 5203 | In this case, use a POST request instead: |
Changcheng Xiao | e5b14ce | 2017-02-10 09:39:48 +0100 | [diff] [blame] | 5204 | |
| 5205 | .Request |
| 5206 | ---- |
| 5207 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/comments/TvcXrmjM/delete HTTP/1.0 |
| 5208 | Content-Type: application/json; charset=UTF-8 |
| 5209 | |
| 5210 | { |
| 5211 | "reason": "contains confidential information" |
| 5212 | } |
| 5213 | ---- |
| 5214 | |
| 5215 | As response a link:#comment-info[CommentInfo] entity is returned that |
| 5216 | describes the updated comment. |
| 5217 | |
| 5218 | .Response |
| 5219 | ---- |
| 5220 | HTTP/1.1 200 OK |
| 5221 | Content-Disposition: attachment |
| 5222 | Content-Type: application/json; charset=UTF-8 |
| 5223 | |
| 5224 | )]}' |
| 5225 | { |
| 5226 | "id": "TvcXrmjM", |
| 5227 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 5228 | "line": 23, |
| 5229 | "message": "Comment removed by: Administrator; Reason: contains confidential information", |
| 5230 | "updated": "2013-02-26 15:40:43.986000000", |
| 5231 | "author": { |
| 5232 | "_account_id": 1000096, |
| 5233 | "name": "John Doe", |
| 5234 | "email": "john.doe@example.com" |
| 5235 | } |
| 5236 | } |
| 5237 | ---- |
| 5238 | |
Edwin Kempin | b050a48 | 2016-12-01 09:11:19 +0100 | [diff] [blame] | 5239 | [[list-robot-comments]] |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 5240 | === List Robot Comments |
| 5241 | -- |
| 5242 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/robotcomments/' |
| 5243 | -- |
| 5244 | |
| 5245 | Lists the link:config-robot-comments.html[robot comments] of a |
| 5246 | revision. |
| 5247 | |
| 5248 | As result a map is returned that maps the file path to a list of |
| 5249 | link:#robot-comment-info[RobotCommentInfo] entries. The entries in the |
| 5250 | map are sorted by file path. |
| 5251 | |
| 5252 | .Request |
| 5253 | ---- |
| 5254 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/robotcomments/ HTTP/1.0 |
| 5255 | ---- |
| 5256 | |
| 5257 | .Response |
| 5258 | ---- |
| 5259 | HTTP/1.1 200 OK |
| 5260 | Content-Disposition: attachment |
| 5261 | Content-Type: application/json; charset=UTF-8 |
| 5262 | |
| 5263 | )]}' |
| 5264 | { |
| 5265 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 5266 | { |
| 5267 | "id": "TvcXrmjM", |
| 5268 | "line": 23, |
| 5269 | "message": "unused import", |
| 5270 | "updated": "2016-02-26 15:40:43.986000000", |
| 5271 | "author": { |
| 5272 | "_account_id": 1000110, |
| 5273 | "name": "Code Analyzer", |
| 5274 | "email": "code.analyzer@example.com" |
| 5275 | }, |
David Pursehouse | b23a5ae | 2020-01-27 13:53:11 +0900 | [diff] [blame] | 5276 | "robot_id": "importChecker", |
| 5277 | "robot_run_id": "76b1375aa8626ea7149792831fe2ed85e80d9e04" |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 5278 | }, |
| 5279 | { |
| 5280 | "id": "TveXwFiA", |
| 5281 | "line": 49, |
| 5282 | "message": "wrong indention", |
| 5283 | "updated": "2016-02-26 15:40:45.328000000", |
| 5284 | "author": { |
| 5285 | "_account_id": 1000110, |
| 5286 | "name": "Code Analyzer", |
| 5287 | "email": "code.analyzer@example.com" |
| 5288 | }, |
David Pursehouse | b23a5ae | 2020-01-27 13:53:11 +0900 | [diff] [blame] | 5289 | "robot_id": "styleChecker", |
| 5290 | "robot_run_id": "5c606c425dd45184484f9d0a2ffd725a7607839b" |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 5291 | } |
| 5292 | ] |
| 5293 | } |
| 5294 | ---- |
| 5295 | |
| 5296 | [[get-robot-comment]] |
| 5297 | === Get Robot Comment |
| 5298 | -- |
| 5299 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/robotcomments/link:#comment-id[\{comment-id\}]' |
| 5300 | -- |
| 5301 | |
| 5302 | Retrieves a link:config-robot-comments.html[robot comment] of a |
| 5303 | revision. |
| 5304 | |
| 5305 | .Request |
| 5306 | ---- |
| 5307 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/robotcomments/TvcXrmjM HTTP/1.0 |
| 5308 | ---- |
| 5309 | |
| 5310 | As response a link:#robot-comment-info[RobotCommentInfo] entity is |
| 5311 | returned that describes the robot comment. |
| 5312 | |
| 5313 | .Response |
| 5314 | ---- |
| 5315 | HTTP/1.1 200 OK |
| 5316 | Content-Disposition: attachment |
| 5317 | Content-Type: application/json; charset=UTF-8 |
| 5318 | |
| 5319 | )]}' |
| 5320 | { |
| 5321 | "id": "TvcXrmjM", |
| 5322 | "line": 23, |
| 5323 | "message": "unused import", |
| 5324 | "updated": "2016-02-26 15:40:43.986000000", |
| 5325 | "author": { |
| 5326 | "_account_id": 1000110, |
| 5327 | "name": "Code Analyzer", |
| 5328 | "email": "code.analyzer@example.com" |
| 5329 | }, |
David Pursehouse | b23a5ae | 2020-01-27 13:53:11 +0900 | [diff] [blame] | 5330 | "robot_id": "importChecker", |
| 5331 | "robot_run_id": "76b1375aa8626ea7149792831fe2ed85e80d9e04" |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 5332 | } |
| 5333 | ---- |
| 5334 | |
Youssef Elghareeb | cdc33b9 | 2021-04-29 18:18:35 +0200 | [diff] [blame] | 5335 | [[list-ported-comments]] |
| 5336 | === List Ported Comments |
Alice Kober-Sotzek | 342da96 | 2020-09-11 11:27:00 +0200 | [diff] [blame] | 5337 | -- |
| 5338 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/ported_comments' |
| 5339 | -- |
| 5340 | |
| 5341 | Ports comments of other revisions to the requested revision. |
| 5342 | |
| 5343 | Only comments added on earlier patchsets are ported. That set of comments is filtered even further |
| 5344 | due to some additional rules. Callers of this endpoint shouldn't rely on the exact logic of which |
| 5345 | comments are ported as that logic might change in the future. Instead, callers must be able to |
| 5346 | handle any smaller/larger set of comments returned by this endpoint. |
| 5347 | |
| 5348 | Typically, a comment thread is returned fully or excluded fully. However, draft comments and |
| 5349 | robot comments are ignored and not returned via this endpoint. Hence, it's possible to get ported |
| 5350 | comments from this endpoint which are a reply to a non-ported robot comment. Callers must be |
| 5351 | able to deal with this situation. |
| 5352 | |
| 5353 | The returned comments are organized in a map of file path to link:#comment-info[CommentInfo] entries |
| 5354 | in the same fashion as for the link:#list-comments[List Revision Comments] endpoint. |
| 5355 | The map is filled with the original comment attributes except for these attributes: `path`, `line`, |
| 5356 | and `range` point to the computed position in the target revision. If the exactly correct position |
| 5357 | can't be determined, those fields will be filled with the next best position. That can also mean |
| 5358 | not filling the `line` or `range` attribute anymore and thus converting the comment to a file |
| 5359 | comment (or even moving the comment to a different file or the patchset level). Callers of this |
| 5360 | endpoint must be able to deal with this and not rely on the original comment position. |
| 5361 | |
| 5362 | It's possible that this endpoint returns different link:#comment-info[CommentInfo] entries with |
| 5363 | the same comment UUID. This is not a bug but a feature. If a comment appears on a file which Gerrit |
| 5364 | recognizes as copied between patchsets, the ported version of this comment consists of two ported |
| 5365 | instances having the same UUID but different `file`/`line`/`range` positions. Callers must be able |
| 5366 | to handle this situation. |
| 5367 | |
| 5368 | Repeated calls of this endpoint might produce different results. Internal errors during the |
| 5369 | position computation are mapped to fallback locations for affected comments. Those errors might |
| 5370 | have vanished on later calls, upon which this endpoint returns the actually mapped position. In |
| 5371 | addition, comments can be deleted and draft comments can be published, upon which the set of ported |
| 5372 | comments may change. |
| 5373 | |
| 5374 | .Request |
| 5375 | ---- |
| 5376 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/4/ported_comments/ HTTP/1.0 |
| 5377 | ---- |
| 5378 | |
| 5379 | .Response |
| 5380 | ---- |
| 5381 | HTTP/1.1 200 OK |
| 5382 | Content-Disposition: attachment |
| 5383 | Content-Type: application/json; charset=UTF-8 |
| 5384 | |
| 5385 | )]}' |
| 5386 | { |
| 5387 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 5388 | { |
| 5389 | "id": "TvcXrmjM", |
| 5390 | "patch_set": 2, |
| 5391 | "line": 23, |
| 5392 | "message": "[nit] trailing whitespace", |
| 5393 | "updated": "2013-02-26 15:40:43.986000000", |
| 5394 | "author": { |
| 5395 | "_account_id": 1000096, |
| 5396 | "name": "John Doe", |
| 5397 | "email": "john.doe@example.com" |
| 5398 | }, |
| 5399 | "unresolved": true |
| 5400 | }, |
| 5401 | { |
| 5402 | "id": "TveXwFiA", |
| 5403 | "patch_set": 2, |
| 5404 | "line": 23, |
| 5405 | "in_reply_to": "TvcXrmjM", |
| 5406 | "message": "Done", |
| 5407 | "updated": "2013-02-26 15:40:45.328000000", |
| 5408 | "author": { |
| 5409 | "_account_id": 1000097, |
| 5410 | "name": "Jane Roe", |
| 5411 | "email": "jane.roe@example.com" |
| 5412 | }, |
| 5413 | "unresolved": true |
| 5414 | } |
| 5415 | ] |
| 5416 | } |
| 5417 | ---- |
| 5418 | |
Youssef Elghareeb | cdc33b9 | 2021-04-29 18:18:35 +0200 | [diff] [blame] | 5419 | [[list-ported-drafts]] |
| 5420 | === List Ported Drafts |
Alice Kober-Sotzek | 342da96 | 2020-09-11 11:27:00 +0200 | [diff] [blame] | 5421 | -- |
| 5422 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/ported_drafts' |
| 5423 | -- |
| 5424 | |
| 5425 | Ports draft comments of other revisions to the requested revision. |
| 5426 | |
Youssef Elghareeb | cdc33b9 | 2021-04-29 18:18:35 +0200 | [diff] [blame] | 5427 | This endpoint behaves similarly to the link:#list-ported-comments[List Ported Comments] endpoint. |
Alice Kober-Sotzek | 342da96 | 2020-09-11 11:27:00 +0200 | [diff] [blame] | 5428 | With this endpoint, only draft comments of the calling user are ported, though. If a draft comment |
| 5429 | is a reply to a published comment, only the ported draft comment is returned. |
| 5430 | |
| 5431 | Depending on the filtering rules, it's possible that this endpoint returns a draft comment which is |
| 5432 | a reply to a comment thread which is not returned by the |
Youssef Elghareeb | cdc33b9 | 2021-04-29 18:18:35 +0200 | [diff] [blame] | 5433 | link:#list-ported-comments[List Ported Comments] endpoint. That's intended behavior. Callers must be |
Alice Kober-Sotzek | 342da96 | 2020-09-11 11:27:00 +0200 | [diff] [blame] | 5434 | able to handle this situation. The same holds for drafts which are a reply to a robot comment. |
| 5435 | |
Youssef Elghareeb | cdc33b9 | 2021-04-29 18:18:35 +0200 | [diff] [blame] | 5436 | Different than the link:#list-ported-comments[List Ported Comments] endpoint, the `author` of the |
Alice Kober-Sotzek | 342da96 | 2020-09-11 11:27:00 +0200 | [diff] [blame] | 5437 | returned comments is not filled for this endpoint as only comments of the calling user are returned. |
| 5438 | |
Patrick Hiesel | afd6c70 | 2020-11-06 10:21:47 +0100 | [diff] [blame] | 5439 | This endpoint requires authentication. |
| 5440 | |
Alice Kober-Sotzek | 342da96 | 2020-09-11 11:27:00 +0200 | [diff] [blame] | 5441 | .Request |
| 5442 | ---- |
| 5443 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/ported_drafts/ HTTP/1.0 |
| 5444 | ---- |
| 5445 | |
| 5446 | .Response |
| 5447 | ---- |
| 5448 | HTTP/1.1 200 OK |
| 5449 | Content-Disposition: attachment |
| 5450 | Content-Type: application/json; charset=UTF-8 |
| 5451 | |
| 5452 | )]}' |
| 5453 | { |
| 5454 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": [ |
| 5455 | { |
| 5456 | "id": "TveXwFiA", |
| 5457 | "patch_set": 2, |
| 5458 | "line": 23, |
| 5459 | "in_reply_to": "TvcXrmjM", |
| 5460 | "message": "Done", |
| 5461 | "updated": "2013-02-26 15:40:45.328000000", |
| 5462 | "unresolved": true |
| 5463 | } |
| 5464 | ] |
| 5465 | } |
| 5466 | ---- |
| 5467 | |
Sharad Bagri | 3f6ed64 | 2022-06-06 12:41:57 -0700 | [diff] [blame] | 5468 | [[apply-stored-fix]] |
| 5469 | === Apply Stored Fix |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 5470 | -- |
| 5471 | 'POST /changes/<<change-id,\{change-id\}>>/revisions/<<revision-id,\{revision-id\}>>/fixes/<<fix-id,\{fix-id\}>>/apply' |
| 5472 | -- |
| 5473 | |
| 5474 | Applies a suggested fix by creating a change edit which includes the |
| 5475 | modifications indicated by the fix suggestion. If a change edit already exists, |
| 5476 | it will be updated accordingly. A fix can only be applied if no change edit |
| 5477 | exists and the fix refers to the current patch set, or the fix refers to the |
| 5478 | patch set on which the change edit is based. |
| 5479 | |
| 5480 | .Request |
| 5481 | ---- |
| 5482 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/fixes/8f605a55_f6aa4ecc/apply HTTP/1.0 |
| 5483 | ---- |
| 5484 | |
| 5485 | If the fix was successfully applied, an <<edit-info,EditInfo>> describing the |
| 5486 | resulting change edit is returned. |
| 5487 | |
| 5488 | .Response |
| 5489 | ---- |
| 5490 | HTTP/1.1 200 OK |
| 5491 | Content-Disposition: attachment |
| 5492 | Content-Type: application/json; charset=UTF-8 |
| 5493 | |
| 5494 | )]}' |
| 5495 | { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 5496 | "commit": { |
| 5497 | "parents": [ |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 5498 | { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 5499 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 5500 | } |
| 5501 | ], |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 5502 | "author": { |
| 5503 | "name": "John Doe", |
| 5504 | "email": "john.doe@example.com", |
| 5505 | "date": "2013-05-07 15:21:27.000000000", |
| 5506 | "tz": 120 |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 5507 | }, |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 5508 | "committer": { |
| 5509 | "name": "Jane Doe", |
| 5510 | "email": "jane.doe@example.com", |
| 5511 | "date": "2013-05-07 15:35:43.000000000", |
| 5512 | "tz": 120 |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 5513 | }, |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 5514 | "subject": "Implement feature X", |
| 5515 | "message": "Implement feature X\n\nWith this feature ..." |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 5516 | }, |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 5517 | "base_patch_set_number": 1, |
| 5518 | "base_revision": "674ac754f91e64a0efb8087e59a176484bd534d1" |
| 5519 | "ref": "refs/users/01/1000001/edit-42622/1" |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 5520 | } |
| 5521 | ---- |
| 5522 | |
| 5523 | If the application failed e.g. due to conflicts with an existing change edit, |
| 5524 | the response "`409 Conflict`" including an error message in the response body |
| 5525 | is returned. |
| 5526 | |
| 5527 | .Response |
| 5528 | ---- |
| 5529 | HTTP/1.1 409 Conflict |
| 5530 | Content-Disposition: attachment |
| 5531 | Content-Type: text/plain; charset=UTF-8 |
| 5532 | |
| 5533 | The existing change edit could not be merged with another tree. |
| 5534 | ---- |
| 5535 | |
Sharad Bagri | bdb582d | 2022-03-26 01:32:35 -0700 | [diff] [blame] | 5536 | [[apply-provided-fix]] |
| 5537 | ==== Apply Provided Fix |
| 5538 | -- |
| 5539 | 'POST /changes/<<change-id,\{change-id\}>>/revisions/<<revision-id,\{revision-id\}>>/fix:apply' |
| 5540 | -- |
| 5541 | Applies a list of <<fix-replacement-info,FixReplacementInfo>> loaded from the |
| 5542 | <<apply-provided-fix-input,ApplyProvidedFixInput>> entity. The fixes are passed as part of the request body. The |
| 5543 | application of the fixes creates a new change edit. `Apply Provided Fix` can only be applied on the current |
| 5544 | patchset. |
| 5545 | |
| 5546 | .Request |
| 5547 | ---- |
| 5548 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/fix:apply HTTP/1.0 |
| 5549 | Content-Type: application/json; charset=UTF-8 |
| 5550 | |
| 5551 | { |
| 5552 | "fix_replacement_infos": [ |
| 5553 | { |
| 5554 | "path": "abcd.txt", |
| 5555 | "range": { |
| 5556 | "start_line": 2, |
| 5557 | "start_character": 2, |
| 5558 | "end_line": 2, |
| 5559 | "end_character": 5 |
| 5560 | }, |
| 5561 | "replacement": "abcdefg" |
| 5562 | } |
| 5563 | ] |
| 5564 | } |
| 5565 | ---- |
| 5566 | |
| 5567 | If the `ApplyProvidedFixInput` was successfully applied, an link:#edit-info[EditInfo] describing the |
| 5568 | resulting change edit is returned. |
| 5569 | |
| 5570 | .Response |
| 5571 | ---- |
| 5572 | HTTP/1.1 200 OK |
| 5573 | Content-Disposition: attachment |
| 5574 | Content-Type: application/json; charset=UTF-8 |
| 5575 | |
| 5576 | )]}' |
| 5577 | { |
| 5578 | "commit": { |
| 5579 | "commit": "bd43e48c33d2b1a03485040eba38cefc505f7997", |
| 5580 | "parents": [ |
| 5581 | { |
| 5582 | "commit": "9825962f8ab6da89afebad3f5034db05fb4b7560" |
| 5583 | } |
| 5584 | ], |
| 5585 | "author": { |
| 5586 | "name": "John Doe", |
| 5587 | "email": "john.doe@example.com", |
| 5588 | "date": "2022-05-07 15:21:27.000000000", |
| 5589 | "tz": 120 |
| 5590 | }, |
| 5591 | "committer": { |
| 5592 | "name": "Jane Doe", |
| 5593 | "email": "jane.doe@example.com", |
| 5594 | "date": "2022-05-07 15:35:43.000000000", |
| 5595 | "tz": 120 |
| 5596 | }, |
| 5597 | "subject": "Implement feature X", |
| 5598 | "message": "Implement feature X\n\nWith this feature ..." |
| 5599 | }, |
| 5600 | "base_patch_set_number": 1, |
| 5601 | "base_revision": "86d87686ce0ef7f7c536bfc7e9a66f5a6fa5d658", |
| 5602 | "ref": "refs/users/01/1000001/edit-1/1" |
| 5603 | } |
| 5604 | ---- |
| 5605 | |
| 5606 | If the application failed due to presence of an existing change edit, |
| 5607 | the response "`400 Bad Request`" including an error message in the response body |
| 5608 | is returned. |
| 5609 | |
| 5610 | .Response |
| 5611 | ---- |
| 5612 | HTTP/1.1 400 Bad Request |
| 5613 | Content-Disposition: attachment |
| 5614 | Content-Type: text/plain; charset=UTF-8 |
| 5615 | |
| 5616 | Change edit already exists. A new change edit can't be created |
| 5617 | ---- |
| 5618 | |
| 5619 | If the application failed due to application on a previous patch set, the response |
| 5620 | "`409 Conflict`" including an error message in the response body is returned. |
| 5621 | |
| 5622 | .Response |
| 5623 | ---- |
| 5624 | HTTP/1.1 409 Conflict |
| 5625 | Content-Disposition: attachment |
| 5626 | Content-Type: text/plain; charset=UTF-8 |
| 5627 | |
| 5628 | A change edit may only be created for the current patch set 1,2 (and not for 1,1) |
| 5629 | ---- |
| 5630 | |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 5631 | [[list-files]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5632 | === List Files |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5633 | -- |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 5634 | '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] | 5635 | -- |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 5636 | |
| 5637 | Lists the files that were modified, added or deleted in a revision. |
| 5638 | |
| 5639 | .Request |
| 5640 | ---- |
| 5641 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/ HTTP/1.0 |
| 5642 | ---- |
| 5643 | |
Makson Lee | faf05c2 | 2018-07-26 22:42:59 +0000 | [diff] [blame] | 5644 | As result a map is returned that maps the link:#file-id[file path] to a |
| 5645 | link:#file-info[FileInfo] entry. The entries in the map are |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 5646 | sorted by file path. |
| 5647 | |
| 5648 | .Response |
| 5649 | ---- |
| 5650 | HTTP/1.1 200 OK |
| 5651 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5652 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 5653 | |
| 5654 | )]}' |
| 5655 | { |
| 5656 | "/COMMIT_MSG": { |
| 5657 | "status": "A", |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 5658 | "lines_inserted": 7, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 5659 | "size_delta": 551, |
| 5660 | "size": 551 |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 5661 | }, |
| 5662 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": { |
| 5663 | "lines_inserted": 5, |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 5664 | "lines_deleted": 3, |
Edwin Kempin | 971a5f5 | 2015-10-28 10:50:39 +0100 | [diff] [blame] | 5665 | "size_delta": 98, |
| 5666 | "size": 23348 |
Edwin Kempin | 682ac71 | 2013-05-14 13:40:46 +0200 | [diff] [blame] | 5667 | } |
| 5668 | } |
| 5669 | ---- |
| 5670 | |
Shawn Pearce | 984747d | 2013-07-18 00:42:16 -0700 | [diff] [blame] | 5671 | The request parameter `reviewed` changes the response to return a list |
| 5672 | of the paths the caller has marked as reviewed. Clients that also |
| 5673 | need the FileInfo should make two requests. |
| 5674 | |
Shawn Pearce | 8ca03a6 | 2015-01-02 22:03:20 -0800 | [diff] [blame] | 5675 | The request parameter `q` changes the response to return a list |
| 5676 | of all files (modified or unmodified) that contain that substring |
| 5677 | in the path name. This is useful to implement suggestion services |
David Pursehouse | fcfb29d | 2019-08-01 12:55:16 +0900 | [diff] [blame] | 5678 | finding a file by partial name. Clients that also need the FileInfo |
| 5679 | should make two requests. |
Shawn Pearce | 8ca03a6 | 2015-01-02 22:03:20 -0800 | [diff] [blame] | 5680 | |
David Pursehouse | 89c00ca | 2019-08-03 13:47:29 +0900 | [diff] [blame] | 5681 | For merge commits only, the integer-valued request parameter `parent` |
| 5682 | changes the response to return a map of the files which are different |
| 5683 | in this commit compared to the given parent commit. The value is the |
Andrii Shyshkalov | 350a451 | 2019-09-23 02:26:33 -0700 | [diff] [blame] | 5684 | 1-based index of the parent's position in the commit object, |
| 5685 | with the first parent always belonging to the target branch. If not |
David Pursehouse | 89c00ca | 2019-08-03 13:47:29 +0900 | [diff] [blame] | 5686 | specified, the response contains a map of the files different in the |
| 5687 | auto merge result. |
Dawid Grzegorczyk | 5904524 | 2015-11-07 11:26:02 +0100 | [diff] [blame] | 5688 | |
David Pursehouse | fcfb29d | 2019-08-01 12:55:16 +0900 | [diff] [blame] | 5689 | The request parameter `base` changes the response to return a map of the |
| 5690 | files which are different in this commit compared to the given revision. The |
| 5691 | revision must correspond to a patch set in the change. |
| 5692 | |
| 5693 | The `reviewed`, `q`, `parent`, and `base` options are mutually exclusive. |
| 5694 | That is, only one of them may be used at a time. |
Shawn Pearce | 984747d | 2013-07-18 00:42:16 -0700 | [diff] [blame] | 5695 | |
| 5696 | .Request |
| 5697 | ---- |
| 5698 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/?reviewed HTTP/1.0 |
| 5699 | ---- |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5700 | |
Shawn Pearce | 984747d | 2013-07-18 00:42:16 -0700 | [diff] [blame] | 5701 | .Response |
| 5702 | ---- |
| 5703 | HTTP/1.1 200 OK |
| 5704 | Content-Disposition: attachment |
| 5705 | Content-Type: application/json; charset=UTF-8 |
| 5706 | |
| 5707 | )]}' |
| 5708 | [ |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 5709 | "/COMMIT_MSG", |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5710 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5711 | ] |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 5712 | ---- |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5713 | |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 5714 | [[get-content]] |
| 5715 | === Get Content |
| 5716 | -- |
| 5717 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/content' |
| 5718 | -- |
| 5719 | |
| 5720 | Gets the content of a file from a certain revision. |
| 5721 | |
Patrick Hiesel | 38667d4 | 2017-05-02 13:12:48 +0200 | [diff] [blame] | 5722 | The optional, integer-valued `parent` parameter can be specified to request |
| 5723 | the named file from a parent commit of the specified revision. The value is |
| 5724 | the 1-based index of the parent's position in the commit object. If the |
| 5725 | parameter is omitted or the value is non-positive, the patch set is referenced. |
| 5726 | |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 5727 | .Request |
| 5728 | ---- |
| 5729 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 5730 | ---- |
| 5731 | |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 5732 | The content is returned as base64 encoded string. The HTTP response |
| 5733 | Content-Type is always `text/plain`, reflecting the base64 wrapping. |
| 5734 | A Gerrit-specific `X-FYI-Content-Type` header is returned describing |
| 5735 | the server detected content type of the file. |
| 5736 | |
| 5737 | If only the content type is required, callers should use HEAD to |
| 5738 | avoid downloading the encoded file contents. |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 5739 | |
| 5740 | .Response |
| 5741 | ---- |
| 5742 | HTTP/1.1 200 OK |
| 5743 | Content-Disposition: attachment |
Shawn Pearce | fb2b36b | 2015-01-01 23:42:12 -0500 | [diff] [blame] | 5744 | Content-Type: text/plain; charset=ISO-8859-1 |
| 5745 | X-FYI-Content-Encoding: base64 |
| 5746 | X-FYI-Content-Type: text/xml |
Edwin Kempin | aef44b0 | 2013-05-07 16:15:55 +0200 | [diff] [blame] | 5747 | |
| 5748 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 5749 | ---- |
| 5750 | |
David Ostrovsky | d007867 | 2015-02-06 21:51:04 +0100 | [diff] [blame] | 5751 | Alternatively, if the only value of the Accept request header is |
| 5752 | `application/json` the content is returned as JSON string and |
| 5753 | `X-FYI-Content-Encoding` is set to `json`. |
| 5754 | |
David Pletcher | d1efb45 | 2015-09-01 17:45:55 -0700 | [diff] [blame] | 5755 | [[get-safe-content]] |
| 5756 | === Download Content |
| 5757 | -- |
| 5758 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/download' |
| 5759 | -- |
| 5760 | |
| 5761 | Downloads the content of a file from a certain revision, in a safe format |
| 5762 | that poses no risk for inadvertent execution of untrusted code. |
| 5763 | |
| 5764 | If the content type is defined as safe, the binary file content is returned |
| 5765 | verbatim. If the content type is not safe, the file is stored inside a ZIP |
| 5766 | file, containing a single entry with a random, unpredictable name having the |
| 5767 | same base and suffix as the true filename. The ZIP file is returned in |
| 5768 | verbatim binary form. |
| 5769 | |
| 5770 | See link:config-gerrit.html#mimetype.name.safe[Gerrit config documentation] |
| 5771 | for information about safe file type configuration. |
| 5772 | |
| 5773 | The HTTP resource Content-Type is dependent on the file type: the |
| 5774 | applicable type for safe files, or "application/zip" for unsafe files. |
| 5775 | |
David Pletcher | ec622bf | 2015-09-18 14:30:05 -0700 | [diff] [blame] | 5776 | The optional, integer-valued `parent` parameter can be specified to request |
| 5777 | the named file from a parent commit of the specified revision. The value is |
| 5778 | the 1-based index of the parent's position in the commit object. If the |
| 5779 | parameter is omitted or the value non-positive, the patch set is referenced. |
| 5780 | |
| 5781 | Filenames are decorated with a suffix of `_new` for the current patch, |
| 5782 | `_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] | 5783 | |
| 5784 | .Request |
| 5785 | ---- |
David Pursehouse | 6147f6d | 2016-10-18 05:40:44 +0000 | [diff] [blame] | 5786 | 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] | 5787 | ---- |
| 5788 | |
| 5789 | .Response |
| 5790 | ---- |
| 5791 | HTTP/1.1 200 OK |
| 5792 | Content-Disposition: attachment; filename="logo.png" |
| 5793 | Content-Type: image/png |
| 5794 | |
| 5795 | `[binary data for logo.png]` |
| 5796 | ---- |
| 5797 | |
| 5798 | .Request |
| 5799 | ---- |
David Pursehouse | 6147f6d | 2016-10-18 05:40:44 +0000 | [diff] [blame] | 5800 | 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] | 5801 | ---- |
| 5802 | |
| 5803 | .Response |
| 5804 | ---- |
| 5805 | HTTP/1.1 200 OK |
| 5806 | Content-Disposition: Content-Disposition:attachment; filename="RefControl_new-931cdb73ae9d97eb500a3533455b055d90b99944.java.zip" |
| 5807 | Content-Type:application/zip |
| 5808 | |
| 5809 | `[binary ZIP archive containing a single file, "RefControl_new-cb218df1337df48a0e7ab30a49a8067ac7321881.java"]` |
| 5810 | ---- |
| 5811 | |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5812 | [[get-diff]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5813 | === Get Diff |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 5814 | -- |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5815 | '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] | 5816 | -- |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5817 | |
| 5818 | Gets the diff of a file from a certain revision. |
| 5819 | |
| 5820 | .Request |
| 5821 | ---- |
| 5822 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/diff HTTP/1.0 |
| 5823 | ---- |
| 5824 | |
| 5825 | As response a link:#diff-info[DiffInfo] entity is returned that describes the diff. |
| 5826 | |
| 5827 | .Response |
| 5828 | ---- |
| 5829 | HTTP/1.1 200 OK |
| 5830 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5831 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5832 | |
| 5833 | )] |
| 5834 | { |
| 5835 | "meta_a": { |
| 5836 | "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] | 5837 | "content_type": "text/x-java-source", |
| 5838 | "lines": 372 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5839 | }, |
| 5840 | "meta_b": { |
| 5841 | "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] | 5842 | "content_type": "text/x-java-source", |
| 5843 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5844 | }, |
| 5845 | "change_type": "MODIFIED", |
| 5846 | "diff_header": [ |
| 5847 | "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", |
| 5848 | "index 59b7670..9faf81c 100644", |
| 5849 | "--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 5850 | "+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java" |
| 5851 | ], |
| 5852 | "content": [ |
| 5853 | { |
| 5854 | "ab": [ |
| 5855 | "// Copyright (C) 2010 The Android Open Source Project", |
| 5856 | "//", |
| 5857 | "// Licensed under the Apache License, Version 2.0 (the \"License\");", |
| 5858 | "// you may not use this file except in compliance with the License.", |
| 5859 | "// You may obtain a copy of the License at", |
| 5860 | "//", |
| 5861 | "// http://www.apache.org/licenses/LICENSE-2.0", |
| 5862 | "//", |
| 5863 | "// Unless required by applicable law or agreed to in writing, software", |
| 5864 | "// distributed under the License is distributed on an \"AS IS\" BASIS,", |
| 5865 | "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", |
| 5866 | "// See the License for the specific language governing permissions and", |
| 5867 | "// limitations under the License." |
| 5868 | ] |
| 5869 | }, |
| 5870 | { |
| 5871 | "b": [ |
| 5872 | "//", |
| 5873 | "// Add some more lines in the header." |
| 5874 | ] |
| 5875 | }, |
| 5876 | { |
| 5877 | "ab": [ |
| 5878 | "", |
| 5879 | "package com.google.gerrit.server.project;", |
| 5880 | "", |
| 5881 | "import com.google.common.collect.Maps;", |
| 5882 | ... |
| 5883 | ] |
| 5884 | } |
| 5885 | ... |
| 5886 | ] |
| 5887 | } |
| 5888 | ---- |
| 5889 | |
| 5890 | If the `intraline` parameter is specified, intraline differences are included in the diff. |
| 5891 | |
| 5892 | .Request |
| 5893 | ---- |
| 5894 | 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 |
| 5895 | ---- |
| 5896 | |
| 5897 | .Response |
| 5898 | ---- |
| 5899 | HTTP/1.1 200 OK |
| 5900 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5901 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5902 | |
| 5903 | )] |
| 5904 | { |
| 5905 | "meta_a": { |
| 5906 | "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] | 5907 | "content_type": "text/x-java-source", |
| 5908 | "lines": 372 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5909 | }, |
| 5910 | "meta_b": { |
| 5911 | "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] | 5912 | "content_type": "text/x-java-source", |
| 5913 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5914 | }, |
| 5915 | "change_type": "MODIFIED", |
| 5916 | "diff_header": [ |
| 5917 | "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", |
| 5918 | "index 59b7670..9faf81c 100644", |
| 5919 | "--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 5920 | "+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java" |
| 5921 | ], |
| 5922 | "content": [ |
| 5923 | ... |
| 5924 | { |
| 5925 | "a": [ |
| 5926 | "/** Manages access control for Git references (aka branches, tags). */" |
| 5927 | ], |
| 5928 | "b": [ |
| 5929 | "/** Manages access control for the Git references (aka branches, tags). */" |
| 5930 | ], |
| 5931 | "edit_a": [], |
| 5932 | "edit_b": [ |
| 5933 | [ |
| 5934 | 31, |
| 5935 | 4 |
| 5936 | ] |
| 5937 | ] |
| 5938 | } |
| 5939 | ] |
| 5940 | } |
| 5941 | ---- |
| 5942 | |
| 5943 | The `base` parameter can be specified to control the base patch set from which the diff should |
| 5944 | be generated. |
| 5945 | |
Dawid Grzegorczyk | 5904524 | 2015-11-07 11:26:02 +0100 | [diff] [blame] | 5946 | The integer-valued request parameter `parent` can be specified to control the |
| 5947 | parent commit number against which the diff should be generated. This is useful |
| 5948 | for supporting review of merge commits. The value is the 1-based index of the |
| 5949 | parent's position in the commit object. |
| 5950 | |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5951 | .Request |
| 5952 | ---- |
| 5953 | 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 |
| 5954 | ---- |
| 5955 | |
| 5956 | .Response |
| 5957 | ---- |
| 5958 | HTTP/1.1 200 OK |
| 5959 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 5960 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5961 | |
| 5962 | )] |
| 5963 | { |
| 5964 | "meta_a": { |
| 5965 | "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] | 5966 | "content_type": "text/x-java-source", |
| 5967 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5968 | }, |
| 5969 | "meta_b": { |
| 5970 | "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] | 5971 | "content_type": "text/x-java-source", |
| 5972 | "lines": 578 |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5973 | }, |
| 5974 | "change_type": "MODIFIED", |
| 5975 | "content": [ |
| 5976 | { |
| 5977 | "skip": 578 |
| 5978 | } |
| 5979 | ] |
| 5980 | } |
| 5981 | ---- |
| 5982 | |
Edwin Kempin | 0b7c40f | 2016-02-09 17:13:23 +0100 | [diff] [blame] | 5983 | The `whitespace` parameter can be specified to control how whitespace |
| 5984 | differences are reported in the result. Valid values are `IGNORE_NONE`, |
| 5985 | `IGNORE_TRAILING`, `IGNORE_LEADING_AND_TRAILING` or `IGNORE_ALL`. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 5986 | |
Sharad Bagri | 3f6ed64 | 2022-06-06 12:41:57 -0700 | [diff] [blame] | 5987 | [[preview-stored-fix]] |
| 5988 | === Preview Stored Fix |
Dmitrii Filippov | bf3f08b | 2019-12-06 03:13:06 +0100 | [diff] [blame] | 5989 | -- |
| 5990 | 'GET /changes/<<change-id,\{change-id\}>>/revisions/<<revision-id,\{revision-id\}>>/fixes/<<fix-id,\{fix-id\}>>/preview' |
| 5991 | -- |
| 5992 | |
| 5993 | Gets the diffs of all files for a certain <<fix-id,\{fix-id\}>>. |
| 5994 | As response, a map of link:#diff-info[DiffInfo] entities is returned that describes the diffs. |
| 5995 | |
| 5996 | Each link:#diff-info[DiffInfo] is the differences between the patch set indicated by revision-id and a virtual patch set with the applied fix. |
| 5997 | |
Sharad Bagri | d1b05fd | 2022-05-18 13:14:17 -0700 | [diff] [blame] | 5998 | [[preview-provided-fix]] |
| 5999 | === Preview Provided fix |
| 6000 | -- |
| 6001 | 'POST /changes/<<change-id,\{change-id\}>>/revisions/<<revision-id,\{revision-id\}>>/fix:preview' |
| 6002 | -- |
| 6003 | |
| 6004 | Gets the diffs of all files for a list of <<fix-replacement-info,FixReplacementInfo>> loaded from |
| 6005 | the <<apply-provided-fix-input,ApplyProvidedFixInput>> entity. The fixes are passed as part of the |
| 6006 | request body. |
| 6007 | As response, a map of link:#diff-info[DiffInfo] is returned that describes the diffs. |
| 6008 | |
| 6009 | Each link:#diff-info[DiffInfo] is the differences between the patch set indicated by revision-id |
| 6010 | and a virtual patch set with the applied fix. No content on the server will be modified as part of this request. |
| 6011 | |
| 6012 | .Request |
| 6013 | ---- |
| 6014 | POST /changes/myProject~master~Id6f0b9d946791f8aba90ace53074eda565983452/revisions/1/fix:preview HTTP/1.0 |
| 6015 | Content-Type: application/json; charset=UTF-8 |
| 6016 | |
| 6017 | { |
| 6018 | "fix_replacement_infos": [ |
| 6019 | { |
| 6020 | "path": "abcd.txt", |
| 6021 | "range": { |
| 6022 | "start_line": 2, |
| 6023 | "start_character": 2, |
| 6024 | "end_line": 2, |
| 6025 | "end_character": 5 |
| 6026 | }, |
| 6027 | "replacement": "abcdefg" |
| 6028 | } |
| 6029 | ] |
| 6030 | } |
| 6031 | ---- |
| 6032 | |
| 6033 | If the `Preview Provided Fix` operation was successful, a link:#diff-info[DiffInfo] previewing the |
| 6034 | change is returned. |
| 6035 | |
| 6036 | .Response |
| 6037 | ---- |
| 6038 | HTTP/1.1 200 OK |
| 6039 | Content-Disposition: attachment |
| 6040 | Content-Type: application/json; charset=UTF-8 |
| 6041 | |
| 6042 | )]}' |
| 6043 | { |
| 6044 | "abcd.txt": { |
| 6045 | "meta_a": { |
| 6046 | "name": "abcd.txt", |
| 6047 | "content_type": "text/plain", |
| 6048 | "lines": 3 |
| 6049 | }, |
| 6050 | "meta_b": { |
| 6051 | "name": "abcd.txt", |
| 6052 | "content_type": "text/plain", |
| 6053 | "lines": 3 |
| 6054 | }, |
| 6055 | "intraline_status": "OK", |
| 6056 | "change_type": "MODIFIED", |
| 6057 | "content": [ |
| 6058 | { |
| 6059 | "ab": [ |
| 6060 | "ABCDEFGHI" |
| 6061 | ] |
| 6062 | }, |
| 6063 | { |
| 6064 | "a": [ |
| 6065 | "JKLMNOPQR" |
| 6066 | ], |
| 6067 | "b": [ |
| 6068 | "JKabcdefgOPQR" |
| 6069 | ], |
| 6070 | "edit_a": [ |
| 6071 | [ |
| 6072 | 2, |
| 6073 | 3 |
| 6074 | ] |
| 6075 | ], |
| 6076 | "edit_b": [ |
| 6077 | [ |
| 6078 | 2, |
| 6079 | 7 |
| 6080 | ] |
| 6081 | ] |
| 6082 | }, |
| 6083 | { |
| 6084 | "ab": [ |
| 6085 | "" |
| 6086 | ] |
| 6087 | } |
| 6088 | ] |
| 6089 | } |
| 6090 | } |
| 6091 | ---- |
| 6092 | |
| 6093 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 6094 | [[get-blame]] |
| 6095 | === Get Blame |
| 6096 | -- |
| 6097 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/files/link:#file-id[\{file-id\}]/blame' |
| 6098 | -- |
| 6099 | |
| 6100 | Gets the blame of a file from a certain revision. |
| 6101 | |
| 6102 | .Request |
| 6103 | ---- |
| 6104 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/blame HTTP/1.0 |
| 6105 | ---- |
| 6106 | |
| 6107 | As response a link:#blame-info[BlameInfo] entity is returned that describes the |
| 6108 | blame. |
| 6109 | |
| 6110 | .Response |
| 6111 | ---- |
| 6112 | HTTP/1.1 200 OK |
| 6113 | Content-Disposition: attachment |
| 6114 | Content-Type: application/json; charset=UTF-8 |
| 6115 | |
| 6116 | )] |
| 6117 | { |
| 6118 | [ |
| 6119 | { |
| 6120 | "author": "Joe Daw", |
| 6121 | "id": "64e140b4de5883a4dd74d06c2b62ccd7ffd224a7", |
| 6122 | "time": 1421441349, |
| 6123 | "commit_msg": "RST test\n\nChange-Id: I11e9e24bd122253f4bb10c36dce825ac2410d646\n", |
| 6124 | "ranges": [ |
| 6125 | { |
| 6126 | "start": 1, |
| 6127 | "end": 10 |
| 6128 | }, |
| 6129 | { |
| 6130 | "start": 16, |
| 6131 | "end": 296 |
| 6132 | } |
| 6133 | ] |
| 6134 | }, |
| 6135 | { |
| 6136 | "author": "Jane Daw", |
| 6137 | "id": "8d52621a0e2ac6adec73bd3a49f2371cd53137a7", |
| 6138 | "time": 1421825421, |
| 6139 | "commit_msg": "add banner\n\nChange-Id: I2eced9b2691015ae3c5138f4d0c4ca2b8fb15be9\n", |
| 6140 | "ranges": [ |
| 6141 | { |
| 6142 | "start": 13, |
| 6143 | "end": 13 |
| 6144 | } |
| 6145 | ] |
| 6146 | } |
| 6147 | ] |
| 6148 | } |
| 6149 | ---- |
| 6150 | |
| 6151 | The `base` parameter can be specified to control the base patch set from which |
| 6152 | the blame should be generated. |
| 6153 | |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 6154 | [[set-reviewed]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6155 | === Set Reviewed |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 6156 | -- |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 6157 | '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] | 6158 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 6159 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 6160 | Marks a file of a revision as reviewed by the calling user. |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 6161 | |
| 6162 | .Request |
| 6163 | ---- |
| 6164 | PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/reviewed HTTP/1.0 |
| 6165 | ---- |
| 6166 | |
| 6167 | .Response |
| 6168 | ---- |
| 6169 | HTTP/1.1 201 Created |
| 6170 | ---- |
| 6171 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 6172 | 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] | 6173 | response is "`200 OK`". |
| 6174 | |
| 6175 | [[delete-reviewed]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6176 | === Delete Reviewed |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 6177 | -- |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 6178 | '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] | 6179 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 6180 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 6181 | 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] | 6182 | |
| 6183 | .Request |
| 6184 | ---- |
| 6185 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/reviewed HTTP/1.0 |
| 6186 | ---- |
| 6187 | |
| 6188 | .Response |
| 6189 | ---- |
| 6190 | HTTP/1.1 204 No Content |
| 6191 | ---- |
| 6192 | |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6193 | [[cherry-pick]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6194 | === Cherry Pick Revision |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 6195 | -- |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6196 | '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] | 6197 | -- |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6198 | |
| 6199 | Cherry picks a revision to a destination branch. |
| 6200 | |
Changcheng Xiao | 54b6c0c | 2017-10-23 14:57:42 +0200 | [diff] [blame] | 6201 | To cherry pick a commit with no change-id associated with it, see |
| 6202 | link:rest-api-projects.html#cherry-pick-commit[CherryPickCommit]. |
| 6203 | |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6204 | The commit message and destination branch must be provided in the request body inside a |
Han-Wen Nienhuys | 02272e0 | 2017-03-28 14:47:09 +0200 | [diff] [blame] | 6205 | link:#cherrypick-input[CherryPickInput] entity. If the commit message |
| 6206 | does not specify a Change-Id, a new one is picked for the destination change. |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6207 | |
Gal Paikin | 8dadd42 | 2021-05-07 10:21:54 +0200 | [diff] [blame] | 6208 | When cherry-picking a change into a branch that already contains the Change-Id |
| 6209 | that we want to cherry-pick, the cherry-pick will create a new patch-set on the |
| 6210 | destination's branch's appropriate Change-Id. If the change is closed on the |
| 6211 | destination branch, the cherry-pick will fail. |
| 6212 | |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6213 | .Request |
| 6214 | ---- |
| 6215 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/cherrypick HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 6216 | Content-Type: application/json; charset=UTF-8 |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6217 | |
| 6218 | { |
Gustaf Lundh | 98df5b5 | 2013-05-07 19:22:13 +0100 | [diff] [blame] | 6219 | "message" : "Implementing Feature X", |
| 6220 | "destination" : "release-branch" |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6221 | } |
| 6222 | ---- |
| 6223 | |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 6224 | As response a link:#change-info[ChangeInfo] entity is returned that |
| 6225 | describes the resulting cherry-pick change. |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6226 | |
| 6227 | .Response |
| 6228 | ---- |
| 6229 | HTTP/1.1 200 OK |
| 6230 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 6231 | Content-Type: application/json; charset=UTF-8 |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6232 | |
| 6233 | )]}' |
| 6234 | { |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6235 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 6236 | "project": "myProject", |
| 6237 | "branch": "release-branch", |
| 6238 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 6239 | "subject": "Implementing Feature X", |
| 6240 | "status": "NEW", |
| 6241 | "created": "2013-02-01 09:59:32.126000000", |
| 6242 | "updated": "2013-02-21 11:16:36.775000000", |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6243 | "mergeable": true, |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 6244 | "insertions": 12, |
| 6245 | "deletions": 11, |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 6246 | "_number": 3965, |
| 6247 | "owner": { |
| 6248 | "name": "John Doe" |
| 6249 | } |
| 6250 | } |
| 6251 | ---- |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6252 | |
Changcheng Xiao | 2fcae69 | 2017-01-02 12:38:30 +0100 | [diff] [blame] | 6253 | [[revision-reviewer-endpoints]] |
| 6254 | == Revision Reviewer Endpoints |
| 6255 | |
| 6256 | [[list-revision-reviewers]] |
| 6257 | === List Revision Reviewers |
| 6258 | -- |
| 6259 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/reviewers/' |
| 6260 | -- |
| 6261 | |
| 6262 | Lists the reviewers of a revision. |
| 6263 | |
| 6264 | Please note that only the current revision is supported. |
| 6265 | |
| 6266 | As result a list of link:#reviewer-info[ReviewerInfo] entries is returned. |
| 6267 | |
| 6268 | .Request |
| 6269 | ---- |
| 6270 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/reviewers/ HTTP/1.0 |
| 6271 | ---- |
| 6272 | |
| 6273 | .Response |
| 6274 | ---- |
| 6275 | HTTP/1.1 200 OK |
| 6276 | Content-Disposition: attachment |
| 6277 | Content-Type: application/json; charset=UTF-8 |
| 6278 | |
| 6279 | )]}' |
| 6280 | [ |
| 6281 | { |
| 6282 | "approvals": { |
| 6283 | "Verified": "+1", |
| 6284 | "Code-Review": "+2" |
| 6285 | }, |
| 6286 | "_account_id": 1000096, |
| 6287 | "name": "John Doe", |
| 6288 | "email": "john.doe@example.com" |
| 6289 | }, |
| 6290 | { |
| 6291 | "approvals": { |
| 6292 | "Verified": " 0", |
| 6293 | "Code-Review": "-1" |
| 6294 | }, |
| 6295 | "_account_id": 1000097, |
| 6296 | "name": "Jane Roe", |
| 6297 | "email": "jane.roe@example.com" |
| 6298 | } |
| 6299 | ] |
| 6300 | ---- |
| 6301 | |
| 6302 | [[list-revision-votes]] |
| 6303 | === List Revision Votes |
| 6304 | -- |
| 6305 | 'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/votes/' |
| 6306 | -- |
| 6307 | |
| 6308 | Lists the votes for a specific reviewer of the revision. |
| 6309 | |
| 6310 | Please note that only the current revision is supported. |
| 6311 | |
| 6312 | .Request |
| 6313 | ---- |
| 6314 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/reviewers/John%20Doe/votes/ HTTP/1.0 |
| 6315 | ---- |
| 6316 | |
| 6317 | As result a map is returned that maps the label name to the label value. |
| 6318 | The entries in the map are sorted by label name. |
| 6319 | |
| 6320 | .Response |
| 6321 | ---- |
| 6322 | HTTP/1.1 200 OK |
| 6323 | Content-Disposition: attachment |
| 6324 | Content-Type: application/json;charset=UTF-8 |
| 6325 | |
| 6326 | )]}' |
| 6327 | { |
| 6328 | "Code-Review": -1, |
| 6329 | "Verified": 1, |
| 6330 | "Work-In-Progress": 1 |
| 6331 | } |
| 6332 | ---- |
| 6333 | |
| 6334 | [[delete-revision-vote]] |
| 6335 | === Delete Revision Vote |
| 6336 | -- |
| 6337 | 'DELETE /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}] |
| 6338 | /reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/votes/link:#label-id[\{label-id\}]' + |
| 6339 | 'POST /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}] |
| 6340 | /reviewers/link:rest-api-accounts.html#account-id[\{account-id\}]/votes/link:#label-id[\{label-id\}]/delete' |
| 6341 | -- |
| 6342 | |
| 6343 | Deletes a single vote from a revision. The deletion will be possible only |
| 6344 | if the revision is the current revision. By using this endpoint you can prevent |
| 6345 | deleting the vote (with same label) from a newer patch set by mistake. |
| 6346 | |
| 6347 | Note, that even when the last vote of a reviewer is removed the reviewer itself |
| 6348 | is still listed on the change. |
| 6349 | |
Gal Paikin | 6ce56dc | 2021-03-29 12:28:43 +0200 | [diff] [blame] | 6350 | If another user removed a user's vote, the user with the deleted vote will be |
| 6351 | added to the attention set. |
| 6352 | |
Changcheng Xiao | 2fcae69 | 2017-01-02 12:38:30 +0100 | [diff] [blame] | 6353 | .Request |
| 6354 | ---- |
| 6355 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/reviewers/John%20Doe/votes/Code-Review HTTP/1.0 |
| 6356 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/reviewers/John%20Doe/votes/Code-Review/delete HTTP/1.0 |
| 6357 | ---- |
| 6358 | |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 6359 | Options can be provided in the request body as a |
| 6360 | link:#delete-vote-input[DeleteVoteInput] entity. |
| 6361 | Historically, this method allowed a body in the DELETE, but that behavior is |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 6362 | link:https://www.gerritcodereview.com/releases/2.16.md[deprecated,role=external,window=_blank]. |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 6363 | In this case, use a POST request instead: |
Changcheng Xiao | 2fcae69 | 2017-01-02 12:38:30 +0100 | [diff] [blame] | 6364 | |
| 6365 | .Request |
| 6366 | ---- |
| 6367 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/reviewers/John%20Doe/votes/Code-Review/delete HTTP/1.0 |
| 6368 | Content-Type: application/json; charset=UTF-8 |
| 6369 | |
| 6370 | { |
| 6371 | "notify": "NONE" |
| 6372 | } |
| 6373 | ---- |
| 6374 | |
| 6375 | .Response |
| 6376 | ---- |
| 6377 | HTTP/1.1 204 No Content |
| 6378 | ---- |
| 6379 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6380 | [[attention-set-endpoints]] |
| 6381 | == Attention Set Endpoints |
| 6382 | |
| 6383 | [[get-attention-set]] |
| 6384 | === Get Attention Set |
| 6385 | -- |
| 6386 | 'GET /changes/link:#change-id[\{change-id\}]/attention' |
| 6387 | -- |
| 6388 | |
| 6389 | Returns all users that are currently in the attention set. |
| 6390 | As response a list of link:#attention-set-info[AttentionSetInfo] |
| 6391 | entity is returned. |
| 6392 | |
| 6393 | .Request |
| 6394 | ---- |
| 6395 | GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/attention HTTP/1.0 |
| 6396 | ---- |
| 6397 | |
| 6398 | .Response |
| 6399 | ---- |
| 6400 | HTTP/1.1 200 OK |
| 6401 | Content-Disposition: attachment |
| 6402 | Content-Type: application/json; charset=UTF-8 |
| 6403 | |
| 6404 | )]}' |
| 6405 | [ |
| 6406 | { |
| 6407 | "account": { |
| 6408 | "_account_id": 1000096, |
| 6409 | "name": "John Doe", |
| 6410 | "email": "john.doe@example.com", |
| 6411 | "username": "jdoe" |
| 6412 | }, |
| 6413 | "last_update": "2013-02-01 09:59:32.126000000", |
| 6414 | "reason": "reviewer or cc replied" |
| 6415 | }, |
| 6416 | { |
| 6417 | "account": { |
| 6418 | "_account_id": 1000097, |
| 6419 | "name": "Jane Doe", |
| 6420 | "email": "jane.doe@example.com", |
| 6421 | "username": "janedoe" |
| 6422 | }, |
| 6423 | "last_update": "2013-02-01 09:59:32.126000000", |
| 6424 | "reason": "Reviewer was added" |
| 6425 | } |
| 6426 | ] |
| 6427 | ---- |
| 6428 | |
| 6429 | [[add-to-attention-set]] |
| 6430 | === Add To Attention Set |
| 6431 | -- |
| 6432 | 'POST /changes/link:#change-id[\{change-id\}]/attention' |
| 6433 | -- |
| 6434 | |
| 6435 | Adds a single user to the attention set of a change. |
| 6436 | |
| 6437 | A user can only be added if they are not in the attention set. |
| 6438 | If a user is added while already in the attention set, the |
| 6439 | request is silently ignored. |
| 6440 | |
Gal Paikin | e631de2 | 2020-10-29 12:19:11 +0100 | [diff] [blame] | 6441 | The user must be a reviewer, cc, uploader, or owner on the change. |
| 6442 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6443 | .Request |
| 6444 | ---- |
| 6445 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/attention HTTP/1.0 |
| 6446 | ---- |
| 6447 | |
| 6448 | Details should be provided in the request body as an |
| 6449 | link:#attention-set-input[AttentionSetInput] entity. |
| 6450 | |
| 6451 | .Request |
| 6452 | ---- |
| 6453 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/attention HTTP/1.0 |
| 6454 | Content-Type: application/json; charset=UTF-8 |
| 6455 | |
| 6456 | { |
| 6457 | "user": "John Doe", |
| 6458 | "reason": "reason" |
| 6459 | } |
| 6460 | ---- |
| 6461 | |
| 6462 | .Response |
| 6463 | ---- |
| 6464 | HTTP/1.1 200 OK |
| 6465 | Content-Disposition: attachment |
| 6466 | Content-Type: application/json; charset=UTF-8 |
| 6467 | |
| 6468 | )]}' |
| 6469 | { |
| 6470 | "_account_id": 1000096, |
| 6471 | "name": "John Doe", |
| 6472 | "email": "john.doe@example.com", |
| 6473 | "username": "jdoe" |
| 6474 | } |
| 6475 | ---- |
| 6476 | |
| 6477 | [[remove-from-attention-set]] |
| 6478 | === Remove from Attention Set |
| 6479 | -- |
| 6480 | 'DELETE /changes/link:#change-id[\{change-id\}]/attention/link:rest-api-accounts.html#account-id[\{account-id\}]' + |
| 6481 | 'POST /changes/link:#change-id[\{change-id\}]/attention/link:rest-api-accounts.html#account-id[\{account-id\}]/delete' |
| 6482 | -- |
| 6483 | |
| 6484 | Deletes a single user from the attention set of a change. |
| 6485 | |
| 6486 | A user can only be removed from the attention set if they |
| 6487 | are currently in the attention set. Otherwise, the request |
| 6488 | is silently ignored. |
| 6489 | |
| 6490 | .Request |
| 6491 | ---- |
| 6492 | DELETE /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/attention/John%20Doe HTTP/1.0 |
| 6493 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/attention/John%20Doe/delete HTTP/1.0 |
| 6494 | ---- |
| 6495 | |
| 6496 | Reason can be provided in the request body as an |
| 6497 | link:#attention-set-input[AttentionSetInput] entity. |
| 6498 | |
| 6499 | User must be left empty, or the user must be exactly |
| 6500 | the same user as in the request header. |
| 6501 | |
| 6502 | .Request |
| 6503 | ---- |
| 6504 | POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/attention/John%20Doe/delete HTTP/1.0 |
| 6505 | Content-Type: application/json; charset=UTF-8 |
| 6506 | |
| 6507 | { |
| 6508 | "reason": "reason" |
| 6509 | } |
| 6510 | ---- |
| 6511 | |
| 6512 | .Response |
| 6513 | ---- |
| 6514 | HTTP/1.1 204 No Content |
| 6515 | ---- |
| 6516 | |
| 6517 | [[attention-set]] |
| 6518 | == Attention Set |
| 6519 | Attention Set is the set of users that should perform some action on the |
| 6520 | change. E.g, reviewers should review the change, owner/uploader should |
| 6521 | add a new patchset or respond to comments. |
| 6522 | |
| 6523 | Users are added to the attention set if one the following apply: |
| 6524 | |
| 6525 | * They are manually added in link:#review-input[ReviewInput] in |
| 6526 | add_to_attention_set. |
| 6527 | * They are added as reviewers. |
| 6528 | * The change is marked ready for review. |
| 6529 | * As an owner/uploader, when someone replies on your change. |
| 6530 | * As a reviewer, when the owner/uploader replies. |
Gal Paikin | 6ce56dc | 2021-03-29 12:28:43 +0200 | [diff] [blame] | 6531 | * When the user's vote is deleted by another user. |
Gal Paikin | 102f6d8 | 2021-04-13 15:21:51 +0200 | [diff] [blame] | 6532 | * The rules above (except manually adding to the attention set) don't apply |
| 6533 | for changes that are work in progress. |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6534 | |
| 6535 | Users are removed from the attention set if one the following apply: |
| 6536 | |
| 6537 | * They are manually removed in link:#review-input[ReviewInput] in |
| 6538 | remove_from_attention_set. |
| 6539 | * They are removed from reviewers. |
| 6540 | * The change is marked work in progress, abandoned, or submitted. |
| 6541 | * When the user replies on a change. |
| 6542 | |
| 6543 | If the ignore_default_attention_set_rules in link:#review-input[ReviewInput] |
| 6544 | is set to true, no other changes to the attention set will occur during the |
| 6545 | link:#set-review[set-review]. |
| 6546 | Also, users specified in the list will occur instead of any of the implicit |
| 6547 | changes to the attention set. E.g, if a user is added by add_to_attention_set |
| 6548 | in link:#review-input[ReviewInput], but also the change is marked work in |
| 6549 | progress, the user will still be added. |
| 6550 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6551 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6552 | == IDs |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6553 | |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 6554 | [[account-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6555 | === link:rest-api-accounts.html#account-id[\{account-id\}] |
Edwin Kempin | a3d02ef | 2013-02-22 16:31:53 +0100 | [diff] [blame] | 6556 | -- |
| 6557 | -- |
| 6558 | |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6559 | [[change-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6560 | === \{change-id\} |
Patrick Hiesel | 18da045 | 2017-12-21 14:02:05 +0100 | [diff] [blame] | 6561 | Identifier that uniquely identifies one change. It contains the URL-encoded |
| 6562 | project name as well as the change number: "'$$<project>~<numericId>$$'" |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6563 | |
David Pursehouse | a592397 | 2020-02-26 09:39:38 +0900 | [diff] [blame] | 6564 | Gerrit also supports the following identifiers: |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6565 | |
| 6566 | * an ID of the change in the format "'$$<project>~<branch>~<Change-Id>$$'", |
| 6567 | where for the branch the `refs/heads/` prefix can be omitted |
| 6568 | ("$$myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940$$") |
| 6569 | * a Change-Id if it uniquely identifies one change |
| 6570 | ("I8473b95934b5732ac55d26311a706c9c2bde9940") |
Patrick Hiesel | 4d2dd18 | 2017-05-09 17:35:18 +0200 | [diff] [blame] | 6571 | * a numeric change ID ("4247") |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6572 | |
Changcheng Xiao | d61590f | 2018-04-30 10:59:14 +0200 | [diff] [blame] | 6573 | [[change-message-id]] |
| 6574 | === \{change-message-id\} |
| 6575 | ID of a change message returned in a link:#change-message-info[ChangeMessageInfo]. |
| 6576 | |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 6577 | [[comment-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6578 | === \{comment-id\} |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 6579 | UUID of a published comment. |
| 6580 | |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 6581 | [[draft-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6582 | === \{draft-id\} |
Edwin Kempin | 3ca5719 | 2013-02-27 07:44:01 +0100 | [diff] [blame] | 6583 | UUID of a draft comment. |
Edwin Kempin | ff9e6e3 | 2013-02-21 13:07:11 +0100 | [diff] [blame] | 6584 | |
David Ostrovsky | beb0b84 | 2014-12-13 00:24:29 +0100 | [diff] [blame] | 6585 | [[label-id]] |
| 6586 | === \{label-id\} |
| 6587 | The name of the label. |
| 6588 | |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 6589 | [[file-id]] |
David Pursehouse | b10c266 | 2016-12-06 08:41:33 +0900 | [diff] [blame] | 6590 | === \{file-id\} |
Edwin Kempin | bea55a5 | 2013-05-14 13:53:39 +0200 | [diff] [blame] | 6591 | The path of the file. |
Edwin Kempin | 9300e4c | 2013-02-27 08:42:06 +0100 | [diff] [blame] | 6592 | |
David Pursehouse | 11badbb | 2017-03-27 10:58:05 +0900 | [diff] [blame] | 6593 | The following magic paths are supported: |
| 6594 | |
| 6595 | * `/COMMIT_MSG`: |
| 6596 | + |
| 6597 | The commit message and headers with the parent commit(s), the author |
| 6598 | information and the committer information. |
| 6599 | |
| 6600 | * `/MERGE_LIST` (for merge commits only): |
| 6601 | + |
| 6602 | The list of commits that are being integrated into the destination |
| 6603 | branch by submitting the merge commit. |
| 6604 | |
Gal Paikin | 3edc142 | 2020-03-19 12:04:52 +0100 | [diff] [blame] | 6605 | * `/PATCHSET_LEVEL`: |
| 6606 | + |
| 6607 | This file path is used exclusively for posting and indicating |
| 6608 | patchset-level comments, thus not relevant for other use-cases. |
| 6609 | |
Alice Kober-Sotzek | bcd275e | 2016-12-05 16:22:07 +0100 | [diff] [blame] | 6610 | [[fix-id]] |
| 6611 | === \{fix-id\} |
| 6612 | UUID of a suggested fix. |
| 6613 | |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 6614 | [[revision-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6615 | === \{revision-id\} |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 6616 | Identifier that uniquely identifies one revision of a change. |
| 6617 | |
| 6618 | This can be: |
| 6619 | |
Shawn Pearce | 9c0722a | 2013-03-02 15:30:31 -0800 | [diff] [blame] | 6620 | * the literal `current` to name the current patch set/revision |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 6621 | * a commit ID ("674ac754f91e64a0efb8087e59a176484bd534d1") |
| 6622 | * an abbreviated commit ID that uniquely identifies one revision of the |
| 6623 | change ("674ac754"), at least 4 digits are required |
Edwin Kempin | 2582c98 | 2022-12-27 15:47:59 +0100 | [diff] [blame] | 6624 | * a numeric patch number ("1" for first patch set of the change) |
Edwin Kempin | 8cc0bab | 2016-09-15 15:53:37 +0200 | [diff] [blame] | 6625 | * "0" or the literal `edit` for a change edit |
Edwin Kempin | da6e5fa | 2013-02-25 14:48:12 +0100 | [diff] [blame] | 6626 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6627 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6628 | == JSON Entities |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6629 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 6630 | [[abandon-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6631 | === AbandonInput |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 6632 | The `AbandonInput` entity contains information for abandoning a change. |
| 6633 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6634 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 6635 | |============================= |
| 6636 | |Field Name ||Description |
| 6637 | |`message` |optional| |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 6638 | Message to be added as review comment to the change when abandoning the |
| 6639 | change. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 6640 | |`notify` |optional| |
Stephen Li | e5fcdf7 | 2016-08-02 11:05:11 -0700 | [diff] [blame] | 6641 | Notify handling that defines to whom email notifications should be sent after |
| 6642 | the change is abandoned. + |
| 6643 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 6644 | If not set, the default is `ALL`. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 6645 | |`notify_details`|optional| |
| 6646 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 6647 | of link:user-notify.html#recipient-types[recipient type] to |
| 6648 | link:#notify-info[NotifyInfo] entity. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 6649 | |============================= |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 6650 | |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 6651 | [[action-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6652 | === ActionInfo |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 6653 | The `ActionInfo` entity describes a REST API call the client can |
| 6654 | make to manipulate a resource. These are frequently implemented by |
| 6655 | plugins and may be discovered at runtime. |
| 6656 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6657 | [options="header",cols="1,^1,5"] |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 6658 | |==================================== |
| 6659 | |Field Name ||Description |
| 6660 | |`method` |optional| |
| 6661 | HTTP method to use with the action. Most actions use `POST`, `PUT` |
| 6662 | or `DELETE` to cause state changes. |
| 6663 | |`label` |optional| |
| 6664 | Short title to display to a user describing the action. In the |
| 6665 | Gerrit web interface the label is used as the text on the button |
| 6666 | presented in the UI. |
| 6667 | |`title` |optional| |
| 6668 | Longer text to display describing the action. In a web UI this |
| 6669 | should be the title attribute of the element, displaying when |
| 6670 | the user hovers the mouse. |
| 6671 | |`enabled` |optional| |
| 6672 | If true the action is permitted at this time and the caller is |
| 6673 | likely allowed to execute it. This may change if state is updated |
| 6674 | at the server or permissions are modified. Not present if false. |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 6675 | |`enabled_options` |optional| |
| 6676 | Optional list of enabled options. + |
| 6677 | See the list of suppported options link:action-options[below]. |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 6678 | |==================================== |
| 6679 | |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 6680 | [[action-options]] |
| 6681 | ==== Action Options |
| 6682 | |
| 6683 | Options that are returned via the `enabled_options` field of |
| 6684 | link:#action-info[ActionInfo]. |
| 6685 | |
| 6686 | [options="header",cols="1,^1,5"] |
| 6687 | |=============================== |
| 6688 | |REST view |Option |Description |
| 6689 | |`rebase` |`rebase`| |
| 6690 | Present if the user can rebase the change. + |
| 6691 | This is the case for the change owner and users with the |
| 6692 | link:access-control.html#category_submit[Submit] or |
| 6693 | link:access-control.html#category_rebase[Rebase] permission if they |
| 6694 | have the link:access-control.html#category_push[Push] permission. |
| 6695 | |`rebase` |`rebase_on_behalf_of`| |
| 6696 | Present if the user can rebase the change on behalf of the uploader. + |
| 6697 | This is the case for the change owner and users with the |
| 6698 | link:access-control.html#category_submit[Submit] or |
| 6699 | link:access-control.html#category_rebase[Rebase] permission. |
| 6700 | |=============================== |
| 6701 | |
| 6702 | For all other REST views no options are returned. |
| 6703 | |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 6704 | [[applypatch-input]] |
| 6705 | === ApplyPatchInput |
| 6706 | The `ApplyPatchInput` entity contains information about a patch to apply. |
| 6707 | |
| 6708 | A new commit will be created from the patch, and saved as a new patch set. |
| 6709 | |
| 6710 | [options="header",cols="1,^1,5"] |
| 6711 | |================================= |
| 6712 | |Field Name ||Description |
| 6713 | |`patch` |required| |
| 6714 | The patch to be applied. Must be compatible with `git diff` output. |
| 6715 | For example, link:#get-patch[Get Patch] output. |
Nitzan Gur-Furman | cf722f6 | 2023-02-15 20:40:33 +0100 | [diff] [blame] | 6716 | The patch must be provided as UTF-8 text, either directly or base64-encoded. |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 6717 | |================================= |
| 6718 | |
| 6719 | [[applypatchpatchset-input]] |
| 6720 | === ApplyPatchPatchSetInput |
| 6721 | The `ApplyPatchPatchSetInput` entity contains information for creating a new patch set from a |
| 6722 | given patch. |
| 6723 | |
| 6724 | [options="header",cols="1,^1,5"] |
| 6725 | |================================= |
| 6726 | |Field Name ||Description |
| 6727 | |`patch` |required| |
| 6728 | The details of the patch to be applied as a link:#applypatch-input[ApplyPatchInput] entity. |
| 6729 | |`commit_message` |optional| |
| 6730 | The commit message for the new patch set. If not specified, a predefined message will be used. |
| 6731 | |`base` |optional| |
| 6732 | 40-hex digit SHA-1 of the commit which will be the parent commit of the newly created patch set. |
| 6733 | If set, it must be a merged commit or a change revision on the destination branch. |
| 6734 | Otherwise, the target change's branch tip will be used. |
| 6735 | |`author` |optional| |
| 6736 | The author of the commit to create. Must be an |
| 6737 | link:rest-api-accounts.html#account-input[AccountInput] entity with at least |
| 6738 | the `name` and `email` fields set. |
| 6739 | The caller needs "Forge Author" permission when using this field, unless specifies their own details. |
| 6740 | This field does not affect the owner of the change, which will continue to use the identity of the |
| 6741 | caller. |
Patrick Hiesel | e6759d5 | 2023-02-21 15:24:15 +0100 | [diff] [blame^] | 6742 | |`response_format_options` |optional| |
| 6743 | List of link:#query-options[query options] to format the response. |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 6744 | |================================= |
| 6745 | |
| 6746 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6747 | [[approval-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6748 | === ApprovalInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6749 | The `ApprovalInfo` entity contains information about an approval from a |
| 6750 | user for a label on a change. |
| 6751 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 6752 | `ApprovalInfo` has the same fields as |
| 6753 | link:rest-api-accounts.html#account-info[AccountInfo]. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6754 | In addition `ApprovalInfo` has the following fields: |
| 6755 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6756 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6757 | |=========================== |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 6758 | |Field Name ||Description |
| 6759 | |`value` |optional| |
Dave Borowitz | a30db91 | 2013-03-22 14:20:33 -0700 | [diff] [blame] | 6760 | The vote that the user has given for the label. If present and zero, the |
| 6761 | user is permitted to vote on the label. If absent, the user is not |
| 6762 | permitted to vote on that label. |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 6763 | |`permitted_voting_range` |optional| |
| 6764 | The link:#voting-range-info[VotingRangeInfo] the user is authorized to vote |
| 6765 | on that label. If present, the user is permitted to vote on the label |
| 6766 | regarding the range values. If absent, the user is not permitted to vote |
| 6767 | on that label. |
| 6768 | |`date` |optional| |
Gustaf Lundh | 2e07d502 | 2013-05-08 17:07:42 +0100 | [diff] [blame] | 6769 | The time and date describing when the approval was made. |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 6770 | |`tag` |optional| |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 6771 | Value of the `tag` field from link:#review-input[ReviewInput] set |
Vitaliy Lotorev | ea88281 | 2018-06-28 20:16:39 +0000 | [diff] [blame] | 6772 | while posting the review. Votes/comments that contain `tag` with |
| 6773 | 'autogenerated:' prefix can be filtered out in the web UI. |
| 6774 | NOTE: To apply different tags on different votes/comments multiple |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 6775 | invocations of the REST call are required. |
Dave Borowitz | e47fe47 | 2016-09-09 13:57:14 -0400 | [diff] [blame] | 6776 | |`post_submit` |not set if `false`| |
| 6777 | If true, this vote was made after the change was submitted. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6778 | |=========================== |
| 6779 | |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6780 | [[attention-set-info]] |
| 6781 | === AttentionSetInfo |
| 6782 | The `AttentionSetInfo` entity contains details of users that are in |
| 6783 | the link:#attention-set[attention set]. |
| 6784 | |
| 6785 | [options="header",cols="1,^1,5"] |
| 6786 | |=========================== |
| 6787 | |Field Name ||Description |
| 6788 | |`account` || link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 6789 | |`last_update` || The link:rest-api.html#timestamp[timestamp] of the last update. |
Marija Savtchouk | 25a5fd5a | 2021-08-06 17:26:24 +0100 | [diff] [blame] | 6790 | |`reason` || |
| 6791 | The reason for adding or removing the user. |
| 6792 | If the update was caused by another user, that account is represented by |
| 6793 | account ID in reason as `<GERRIT_ACCOUNT_18419>` and the corresponding |
| 6794 | link:rest-api-accounts.html#account-info[AccountInfo] can be found in `reason_account` field. |
| 6795 | |`reason_account` || |
| 6796 | link:rest-api-accounts.html#account-info[AccountInfo] of the user who caused the update. |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6797 | |
| 6798 | |=========================== |
| 6799 | [[attention-set-input]] |
| 6800 | === AttentionSetInput |
| 6801 | The `AttentionSetInput` entity contains details for adding users to the |
| 6802 | link:#attention-set[attention set] and removing them from it. |
| 6803 | |
| 6804 | [options="header",cols="1,^1,5"] |
| 6805 | |=========================== |
Gal Paikin | f2b1b33 | 2020-07-06 16:34:36 +0300 | [diff] [blame] | 6806 | |Field Name ||Description |
| 6807 | |`user` |optional| link:rest-api-accounts.html#account-id[ID] |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6808 | of the account that should be added to the attention set. For removals, |
| 6809 | this field should be empty or the same as the field in the request header. |
Gal Paikin | f2b1b33 | 2020-07-06 16:34:36 +0300 | [diff] [blame] | 6810 | |`reason` || The reason of for adding or removing the user. |
| 6811 | |`notify` |optional| |
| 6812 | Notify handling that defines to whom email notifications should be sent |
| 6813 | after the change is created. + |
| 6814 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 6815 | If not set, the default is `OWNER`. |
| 6816 | |`notify_details` |optional| |
| 6817 | Additional information about whom to notify about the change creation |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 6818 | as a map of link:user-notify.html#recipient-types[recipient type] to |
| 6819 | link:#notify-info[NotifyInfo] entity. |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6820 | |=========================== |
| 6821 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 6822 | [[blame-info]] |
| 6823 | === BlameInfo |
| 6824 | The `BlameInfo` entity stores the commit metadata with the row coordinates where |
| 6825 | it applies. |
| 6826 | |
| 6827 | [options="header",cols="1,6"] |
| 6828 | |=========================== |
| 6829 | |Field Name | Description |
| 6830 | |`author` | The author of the commit. |
| 6831 | |`id` | The id of the commit. |
| 6832 | |`time` | Commit time. |
| 6833 | |`commit_msg` | The commit message. |
| 6834 | |`ranges` | |
| 6835 | The blame row coordinates as link:#range-info[RangeInfo] entities. |
| 6836 | |=========================== |
| 6837 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 6838 | [[change-edit-input]] |
| 6839 | === ChangeEditInput |
| 6840 | The `ChangeEditInput` entity contains information for restoring a |
| 6841 | path within change edit. |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 6842 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 6843 | [options="header",cols="1,^1,5"] |
| 6844 | |=========================== |
| 6845 | |Field Name ||Description |
| 6846 | |`restore_path`|optional|Path to file to restore. |
| 6847 | |`old_path` |optional|Old path to file to rename. |
| 6848 | |`new_path` |optional|New path to file to rename. |
| 6849 | |=========================== |
| 6850 | |
| 6851 | [[change-edit-message-input]] |
| 6852 | === ChangeEditMessageInput |
| 6853 | The `ChangeEditMessageInput` entity contains information for changing |
| 6854 | the commit message within a change edit. |
| 6855 | |
| 6856 | [options="header",cols="1,^1,5"] |
| 6857 | |=========================== |
| 6858 | |Field Name ||Description |
| 6859 | |`message` ||New commit message. |
| 6860 | |=========================== |
David Ostrovsky | 8c5f80a | 2013-09-02 20:22:39 +0200 | [diff] [blame] | 6861 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6862 | [[change-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6863 | === ChangeInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6864 | The `ChangeInfo` entity contains information about a change. |
| 6865 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 6866 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6867 | |================================== |
| 6868 | |Field Name ||Description |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6869 | |`id` || |
| 6870 | The ID of the change in the format "'<project>\~<branch>~<Change-Id>'", |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 6871 | where 'project', 'branch' and 'Change-Id' are URL encoded. For 'branch' the |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6872 | `refs/heads/` prefix is omitted. |
| 6873 | |`project` ||The name of the project. |
| 6874 | |`branch` || |
| 6875 | The name of the target branch. + |
| 6876 | The `refs/heads/` prefix is omitted. |
Edwin Kempin | cd6c01a1 | 2013-02-21 14:58:52 +0100 | [diff] [blame] | 6877 | |`topic` |optional|The topic to which this change belongs. |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 6878 | |`attention_set` |optional| |
| 6879 | The map that maps link:rest-api-accounts.html#account-id[account IDs] |
Gal Paikin | 69f2046 | 2021-11-08 17:26:42 +0100 | [diff] [blame] | 6880 | to link:#attention-set-info[AttentionSetInfo] of that account. Those are all |
| 6881 | accounts that are currently in the attention set. |
| 6882 | |`removed_from_attention_set` |optional| |
| 6883 | The map that maps link:rest-api-accounts.html#account-id[account IDs] |
| 6884 | to link:#attention-set-info[AttentionSetInfo] of that account. Those are all |
| 6885 | accounts that were in the attention set but were removed. The |
| 6886 | link:#attention-set-info[AttentionSetInfo] is the latest and most recent removal |
| 6887 | of the account from the attention set. |
Edwin Kempin | 93b74fb | 2017-08-25 10:42:56 +0200 | [diff] [blame] | 6888 | |`hashtags` |optional| |
Gal Paikin | 07a580c | 2021-04-15 09:47:36 +0200 | [diff] [blame] | 6889 | List of hashtags that are set on the change. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6890 | |`change_id` ||The Change-Id of the change. |
| 6891 | |`subject` || |
| 6892 | The subject of the change (header line of the commit message). |
| 6893 | |`status` || |
David Ostrovsky | 6ffb7d9 | 2017-02-13 21:16:58 +0100 | [diff] [blame] | 6894 | The status of the change (`NEW`, `MERGED`, `ABANDONED`). |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6895 | |`created` || |
| 6896 | The link:rest-api.html#timestamp[timestamp] of when the change was |
| 6897 | created. |
| 6898 | |`updated` || |
| 6899 | The link:rest-api.html#timestamp[timestamp] of when the change was last |
| 6900 | updated. |
Khai Do | 96a7caf | 2016-01-07 14:07:54 -0800 | [diff] [blame] | 6901 | |`submitted` |only set for merged changes| |
| 6902 | The link:rest-api.html#timestamp[timestamp] of when the change was |
| 6903 | submitted. |
Dave Borowitz | 8ec31f9 | 2017-08-23 10:28:34 -0400 | [diff] [blame] | 6904 | |`submitter` |only set for merged changes| |
| 6905 | The user who submitted the change, as an |
| 6906 | link:rest-api-accounts.html#account-info[ AccountInfo] entity. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6907 | |`starred` |not set if `false`| |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 6908 | Whether the calling user has starred this change with the default label. |
| 6909 | |`stars` |optional| |
| 6910 | A list of star labels that are applied by the calling user to this |
| 6911 | change. The labels are lexicographically sorted. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6912 | |`reviewed` |not set if `false`| |
| 6913 | Whether the change was reviewed by the calling user. |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 6914 | Only set if link:#reviewed[reviewed] is requested. |
Dave Borowitz | ace3210 | 2015-12-17 13:08:25 -0500 | [diff] [blame] | 6915 | |`submit_type` |optional| |
Changcheng Xiao | 2188598 | 2019-01-15 18:16:51 +0100 | [diff] [blame] | 6916 | The link:config-project-config.html#submit-type[submit type] of the change. + |
Dave Borowitz | ace3210 | 2015-12-17 13:08:25 -0500 | [diff] [blame] | 6917 | Not set for merged changes. |
Edwin Kempin | baf70e1 | 2013-02-27 10:36:13 +0100 | [diff] [blame] | 6918 | |`mergeable` |optional| |
| 6919 | Whether the change is mergeable. + |
Patrick Hiesel | a4824db | 2019-12-20 10:55:26 +0100 | [diff] [blame] | 6920 | Only set for open changes if |
| 6921 | link:config-gerrit.html#change.mergeabilityComputationBehavior[change.mergeabilityComputationBehavior] |
| 6922 | is `API_REF_UPDATED_AND_CHANGE_REINDEX`. |
Shawn Pearce | 4cd05b2 | 2016-09-17 22:45:33 -0700 | [diff] [blame] | 6923 | |`submittable` |optional| |
| 6924 | Whether the change has been approved by the project submit rules. + |
Jonathan Nieder | cb51d74 | 2016-09-23 11:37:57 -0700 | [diff] [blame] | 6925 | Only set if link:#submittable[requested]. |
Edwin Kempin | a6b6eaf | 2013-11-23 11:05:58 +0100 | [diff] [blame] | 6926 | |`insertions` || |
| 6927 | Number of inserted lines. |
| 6928 | |`deletions` || |
| 6929 | Number of deleted lines. |
Dave Borowitz | c001f32 | 2018-10-31 14:31:08 -0700 | [diff] [blame] | 6930 | |`total_comment_count` |optional| |
| 6931 | Total number of inline comments across all patch sets. Not set if the current |
| 6932 | change index doesn't have the data. |
Changcheng Xiao | 81c4809 | 2017-02-08 13:04:07 +0100 | [diff] [blame] | 6933 | |`unresolved_comment_count` |optional| |
Dave Borowitz | c001f32 | 2018-10-31 14:31:08 -0700 | [diff] [blame] | 6934 | Number of unresolved inline comment threads across all patch sets. Not set if |
| 6935 | the current change index doesn't have the data. |
Ben Rohlfs | b56e355 | 2021-09-10 09:04:19 +0200 | [diff] [blame] | 6936 | |`_number` || |
| 6937 | The numeric ID of the change. (The underscore is just a relict of a prior |
| 6938 | attempt to deprecate the numeric ID.) |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6939 | |`owner` || |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 6940 | The owner of the change as an link:rest-api-accounts.html#account-info[ |
| 6941 | AccountInfo] entity. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 6942 | |`actions` |optional| |
| 6943 | Actions the caller might be able to perform on this revision. The |
| 6944 | information is a map of view name to link:#action-info[ActionInfo] |
| 6945 | entities. |
Youssef Elghareeb | 02d33aa | 2021-10-04 13:24:52 +0200 | [diff] [blame] | 6946 | |`submit_records` || |
| 6947 | List of the link:rest-api-changes.html#submit-record-info[SubmitRecordInfo] |
| 6948 | containing the submit records for the change at the latest patchset. |
Maxime Guerreiro | d32aedb | 2018-03-22 15:29:10 +0100 | [diff] [blame] | 6949 | |`requirements` |optional| |
| 6950 | List of the link:rest-api-changes.html#requirement[requirements] to be met before this change |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 6951 | can be submitted. This field is deprecated in favour of `submit_requirements`. |
| 6952 | |`submit_requirements` |optional| |
| 6953 | List of the link:#submit-requirement-result-info[SubmitRequirementResultInfo] |
| 6954 | containing the evaluated submit requirements for the change. |
| 6955 | Only set if link:#submit-requirements[`SUBMIT_REQUIREMENTS`] is requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6956 | |`labels` |optional| |
| 6957 | The labels of the change as a map that maps the label names to |
| 6958 | link:#label-info[LabelInfo] entries. + |
| 6959 | Only set if link:#labels[labels] or link:#detailed-labels[detailed |
| 6960 | labels] are requested. |
| 6961 | |`permitted_labels` |optional| |
| 6962 | A map of the permitted labels that maps a label name to the list of |
| 6963 | values that are allowed for that label. + |
| 6964 | Only set if link:#detailed-labels[detailed labels] are requested. |
Nitzan Gur-Furman | d122357 | 2023-01-16 12:07:46 +0000 | [diff] [blame] | 6965 | |`removable_labels` |optional| |
| 6966 | A map of the removable labels that maps a label name to the map of |
| 6967 | values and reviewers ( |
| 6968 | link:rest-api-accounts.html#account-info[AccountInfo] entities) |
| 6969 | that are allowed to be removed from the change. + |
| 6970 | Only set if link:#labels[labels] or |
| 6971 | link:#detailed-labels[detailed labels] are requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 6972 | |`removable_reviewers`|optional| |
| 6973 | 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] | 6974 | link:rest-api-accounts.html#account-info[AccountInfo] entities. + |
Patrick Hiesel | ae92ad8 | 2020-11-17 11:09:05 +0100 | [diff] [blame] | 6975 | Only set if link:#labels[labels] or |
| 6976 | link:#detailed-labels[detailed labels] are requested. |
Logan Hanks | 296cd89 | 2017-05-03 15:14:41 -0700 | [diff] [blame] | 6977 | |`reviewers` |optional| |
Edwin Kempin | 66af3d8 | 2015-11-10 17:38:40 -0800 | [diff] [blame] | 6978 | The reviewers as a map that maps a reviewer state to a list of |
| 6979 | link:rest-api-accounts.html#account-info[AccountInfo] entities. |
| 6980 | Possible reviewer states are `REVIEWER`, `CC` and `REMOVED`. + |
| 6981 | `REVIEWER`: Users with at least one non-zero vote on the change. + |
| 6982 | `CC`: Users that were added to the change, but have not voted. + |
| 6983 | `REMOVED`: Users that were previously reviewers on the change, but have |
| 6984 | been removed. + |
Patrick Hiesel | ae92ad8 | 2020-11-17 11:09:05 +0100 | [diff] [blame] | 6985 | Only set if link:#labels[labels] or |
| 6986 | link:#detailed-labels[detailed labels] are requested. |
Logan Hanks | 296cd89 | 2017-05-03 15:14:41 -0700 | [diff] [blame] | 6987 | |`pending_reviewers` |optional| |
| 6988 | Updates to `reviewers` that have been made while the change was in the |
| 6989 | WIP state. Only present on WIP changes and only if there are pending |
| 6990 | reviewer updates to report. These are reviewers who have not yet been |
| 6991 | notified about being added to or removed from the change. + |
Patrick Hiesel | ae92ad8 | 2020-11-17 11:09:05 +0100 | [diff] [blame] | 6992 | Only set if link:#labels[labels] or |
| 6993 | link:#detailed-labels[detailed labels] are requested. |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 6994 | |`reviewer_updates`|optional| |
| 6995 | Updates to reviewers set for the change as |
| 6996 | link:#review-update-info[ReviewerUpdateInfo] entities. |
Han-Wen Nienhuys | 3c670be | 2020-06-30 19:17:07 +0200 | [diff] [blame] | 6997 | Only set if link:#reviewer-updates[reviewer updates] are requested. |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 6998 | |`messages`|optional| |
Shawn Pearce | 414c5ff | 2013-09-06 21:51:02 -0700 | [diff] [blame] | 6999 | Messages associated with the change as a list of |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 7000 | link:#change-message-info[ChangeMessageInfo] entities. + |
| 7001 | Only set if link:#messages[messages] are requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7002 | |`current_revision` |optional| |
| 7003 | The commit ID of the current patch set of this change. + |
| 7004 | Only set if link:#current-revision[the current revision] is requested |
| 7005 | or if link:#all-revisions[all revisions] are requested. |
| 7006 | |`revisions` |optional| |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 7007 | 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] | 7008 | patch set to a link:#revision-info[RevisionInfo] entity. + |
Dave Borowitz | 0adf270 | 2014-01-22 10:41:52 -0800 | [diff] [blame] | 7009 | Only set if link:#current-revision[the current revision] is requested |
| 7010 | (in which case it will only contain a key for the current revision) or |
| 7011 | if link:#all-revisions[all revisions] are requested. |
Han-Wen Nienhuys | 4ec526a | 2021-02-16 19:20:26 +0100 | [diff] [blame] | 7012 | |`meta_rev_id` |optional| |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 7013 | The SHA-1 of the NoteDb meta ref. |
Makson Lee | 3568a93 | 2017-08-28 17:12:03 +0800 | [diff] [blame] | 7014 | |`tracking_ids` |optional| |
| 7015 | A list of link:#tracking-id-info[TrackingIdInfo] entities describing |
| 7016 | references to external tracking systems. Only set if |
| 7017 | link:#tracking-ids[tracking ids] are requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7018 | |`_more_changes` |optional, not set if `false`| |
| 7019 | Whether the query would deliver more results if not limited. + |
Dave Borowitz | 4241459 | 2014-12-19 11:27:14 -0800 | [diff] [blame] | 7020 | Only set on the last change that is returned. |
Dave Borowitz | 5c894d4 | 2014-11-25 17:43:06 -0500 | [diff] [blame] | 7021 | |`problems` |optional| |
| 7022 | A list of link:#problem-info[ProblemInfo] entities describing potential |
Dave Borowitz | 4c46c24 | 2014-12-03 16:46:45 -0800 | [diff] [blame] | 7023 | problems with this change. Only set if link:#check[CHECK] is set. |
David Ostrovsky | cb19cec | 2017-04-28 11:55:45 +0200 | [diff] [blame] | 7024 | |`is_private` |optional, not set if `false`| |
| 7025 | When present, change is marked as private. |
David Ostrovsky | 258849b | 2017-03-09 23:21:03 +0100 | [diff] [blame] | 7026 | |`work_in_progress` |optional, not set if `false`| |
| 7027 | When present, change is marked as Work In Progress. |
Logan Hanks | 724b24c | 2017-07-14 10:01:05 -0700 | [diff] [blame] | 7028 | |`has_review_started` |optional, not set if `false`| |
Logan Hanks | 296cd89 | 2017-05-03 15:14:41 -0700 | [diff] [blame] | 7029 | When present, change has been marked Ready at some point in time. |
Patrick Hiesel | 828f322 | 2017-07-13 14:18:38 +0200 | [diff] [blame] | 7030 | |`revert_of` |optional| |
| 7031 | The numeric Change-Id of the change that this change reverts. |
Gal Paikin | f57225a | 2019-11-13 12:39:12 -0800 | [diff] [blame] | 7032 | |`submission_id` |optional| |
| 7033 | ID of the submission of this change. Only set if the status is `MERGED`. |
Gal Paikin | dd31db9 | 2019-12-06 14:43:35 +0100 | [diff] [blame] | 7034 | This ID is equal to the numeric ID of the change that triggered the submission. |
| 7035 | If the change that triggered the submission also has a topic, it will be |
| 7036 | "<id>-<topic>" of the change that triggered the submission. |
| 7037 | The callers must not rely on the format of the submission ID. |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7038 | |`cherry_pick_of_change` |optional| |
Kaushik Lingarkar | 73bcb41 | 2020-01-29 13:00:46 -0800 | [diff] [blame] | 7039 | The numeric Change-Id of the change that this change was cherry-picked from. |
Edwin Kempin | 4529d64 | 2021-02-01 13:03:08 +0100 | [diff] [blame] | 7040 | Only set if the cherry-pick has been done through the Gerrit REST API (and |
| 7041 | not if a cherry-picked commit was pushed). |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7042 | |`cherry_pick_of_patch_set`|optional| |
Kaushik Lingarkar | 73bcb41 | 2020-01-29 13:00:46 -0800 | [diff] [blame] | 7043 | The patchset number of the change that this change was cherry-picked from. |
Edwin Kempin | 4529d64 | 2021-02-01 13:03:08 +0100 | [diff] [blame] | 7044 | Only set if the cherry-pick has been done through the Gerrit REST API (and |
| 7045 | not if a cherry-picked commit was pushed). |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7046 | |`contains_git_conflicts` |optional, not set if `false`| |
| 7047 | Whether the change contains conflicts. + |
| 7048 | If `true`, some of the file contents of the change contain git conflict |
| 7049 | markers to indicate the conflicts. + |
| 7050 | Only set if this change info is returned in response to a request that |
| 7051 | creates a new change or patch set and conflicts are allowed. In |
| 7052 | particular this field is only populated if the change info is returned |
| 7053 | by one of the following REST endpoints: link:#create-change[Create |
| 7054 | Change], link:#create-merge-patch-set-for-change[Create Merge Patch Set |
| 7055 | For Change], link:#cherry-pick[Cherry Pick Revision], |
Edwin Kempin | 269a950 | 2022-05-11 12:28:22 +0200 | [diff] [blame] | 7056 | link:rest-api-project.html#cherry-pick-commit[Cherry Pick Commit], |
| 7057 | link:#rebase-change[Rebase Change] |
Yuxuan 'fishy' Wang | af6807f | 2016-02-10 15:11:57 -0800 | [diff] [blame] | 7058 | |================================== |
| 7059 | |
| 7060 | [[change-input]] |
| 7061 | === ChangeInput |
| 7062 | The `ChangeInput` entity contains information about creating a new change. |
| 7063 | |
| 7064 | [options="header",cols="1,^1,5"] |
| 7065 | |================================== |
| 7066 | |Field Name ||Description |
| 7067 | |`project` ||The name of the project. |
| 7068 | |`branch` || |
| 7069 | The name of the target branch. + |
| 7070 | The `refs/heads/` prefix is omitted. |
| 7071 | |`subject` || |
Edwin Kempin | ba8388c | 2020-03-06 08:46:59 +0100 | [diff] [blame] | 7072 | The commit message of the change. Comment lines (beginning with `#`) |
| 7073 | will be removed. If the commit message contains a Change-Id (as a |
| 7074 | "Change-Id: I..." footer) that Change-Id will be used for the newly |
| 7075 | created changed. If a change with this Change-Id already exists for |
| 7076 | same repository and branch, the request is rejected since Change-Ids |
| 7077 | must be unique per repository and branch. If the commit message doesn't |
| 7078 | contain a Change-Id, a newly generated Change-Id is automatically |
| 7079 | inserted into the commit message. |
Yuxuan 'fishy' Wang | af6807f | 2016-02-10 15:11:57 -0800 | [diff] [blame] | 7080 | |`topic` |optional|The topic to which this change belongs. |
Gal Paikin | 44dbd7e | 2020-04-15 15:23:44 +0200 | [diff] [blame] | 7081 | Topic can't contain quotation marks. |
Yuxuan 'fishy' Wang | af6807f | 2016-02-10 15:11:57 -0800 | [diff] [blame] | 7082 | |`status` |optional, default to `NEW`| |
David Ostrovsky | 4b44bdc | 2017-07-27 08:05:43 +0200 | [diff] [blame] | 7083 | The status of the change (only `NEW` accepted here). |
Edwin Kempin | 14d50ed | 2017-05-03 13:26:30 +0200 | [diff] [blame] | 7084 | |`is_private` |optional, default to `false`| |
| 7085 | Whether the new change should be marked as private. |
| 7086 | |`work_in_progress` |optional, default to `false`| |
| 7087 | Whether the new change should be set to work in progress. |
David Ostrovsky | 9d8ec42 | 2014-12-24 00:52:09 +0100 | [diff] [blame] | 7088 | |`base_change` |optional| |
| 7089 | A link:#change-id[\{change-id\}] that identifies the base change for a create |
Nitzan Gur-Furman | 6799a83 | 2023-01-13 12:20:25 +0100 | [diff] [blame] | 7090 | change operation. + |
| 7091 | Mutually exclusive with `base_commit`. + |
| 7092 | If neither `base_commit` nor `base_change` are set, the target branch tip will |
| 7093 | be used as the parent commit. |
Aaron Gable | e8e7328 | 2018-04-26 11:09:30 -0700 | [diff] [blame] | 7094 | |`base_commit` |optional| |
| 7095 | A 40-digit hex SHA-1 of the commit which will be the parent commit of the newly |
Nitzan Gur-Furman | 6799a83 | 2023-01-13 12:20:25 +0100 | [diff] [blame] | 7096 | created change. If set, it must be a merged commit on the destination branch. + |
| 7097 | Mutually exclusive with `base_change`. + |
| 7098 | If neither `base_commit` nor `base_change` are set, the target branch tip will |
| 7099 | be used as the parent commit. |
Yuxuan 'fishy' Wang | af6807f | 2016-02-10 15:11:57 -0800 | [diff] [blame] | 7100 | |`new_branch` |optional, default to `false`| |
Edwin Kempin | e94bb87 | 2019-10-08 13:47:41 +0200 | [diff] [blame] | 7101 | Allow creating a new branch when set to `true`. Using this option is |
| 7102 | only possible for non-merge commits (if the `merge` field is not set). |
Edwin Kempin | ed8a6bf | 2021-06-15 14:00:31 +0200 | [diff] [blame] | 7103 | |`validation_options` |optional| |
| 7104 | Map with key-value pairs that are forwarded as options to the commit validation |
| 7105 | listeners (e.g. can be used to skip certain validations). Which validation |
| 7106 | options are supported depends on the installed commit validation listeners. |
| 7107 | Gerrit core doesn't support any validation options, but commit validation |
| 7108 | listeners that are implemented in plugins may. Please refer to the |
| 7109 | documentation of the installed plugins to learn whether they support validation |
| 7110 | options. Unknown validation options are silently ignored. |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 7111 | |`merge` |optional| |
| 7112 | The detail of a merge commit as a link:#merge-input[MergeInput] entity. |
Edwin Kempin | e94bb87 | 2019-10-08 13:47:41 +0200 | [diff] [blame] | 7113 | If set, the target branch (see `branch` field) must exist (it is not |
| 7114 | possible to create it automatically by setting the `new_branch` field |
| 7115 | to `true`. |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 7116 | |`patch` |optional| |
| 7117 | The detail of a patch to be applied as an link:#applypatch-input[ApplyPatchInput] entity. |
Han-Wen Nienhuys | 2a1029e | 2020-01-30 18:52:45 +0100 | [diff] [blame] | 7118 | |`author` |optional| |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 7119 | The author of the commit to create. Must be an |
| 7120 | link:rest-api-accounts.html#account-input[AccountInput] entity with at least |
| 7121 | the `name` and `email` fields set. |
Han-Wen Nienhuys | 2a1029e | 2020-01-30 18:52:45 +0100 | [diff] [blame] | 7122 | The caller needs "Forge Author" permission when using this field. |
| 7123 | This field does not affect the owner of the change, which will |
| 7124 | continue to use the identity of the caller. |
Edwin Kempin | 5f8c383 | 2017-01-13 11:45:06 +0100 | [diff] [blame] | 7125 | |`notify` |optional| |
| 7126 | Notify handling that defines to whom email notifications should be sent |
| 7127 | after the change is created. + |
| 7128 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 7129 | If not set, the default is `ALL`. |
| 7130 | |`notify_details` |optional| |
| 7131 | Additional information about whom to notify about the change creation |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 7132 | as a map of link:user-notify.html#recipient-types[recipient type] to |
| 7133 | link:#notify-info[NotifyInfo] entity. |
Patrick Hiesel | e6759d5 | 2023-02-21 15:24:15 +0100 | [diff] [blame^] | 7134 | |`response_format_options` |optional| |
| 7135 | List of link:#query-options[query options] to format the response. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7136 | |================================== |
| 7137 | |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 7138 | [[change-message-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7139 | === ChangeMessageInfo |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 7140 | The `ChangeMessageInfo` entity contains information about a message |
| 7141 | attached to a change. |
| 7142 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7143 | [options="header",cols="1,^1,5"] |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 7144 | |================================== |
| 7145 | |Field Name ||Description |
| 7146 | |`id` ||The ID of the message. |
| 7147 | |`author` |optional| |
Khai Do | 23845a1 | 2014-06-02 11:28:16 -0700 | [diff] [blame] | 7148 | Author of the message as an |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 7149 | link:rest-api-accounts.html#account-info[AccountInfo] entity. + |
| 7150 | Unset if written by the Gerrit system. |
Patrick Hiesel | 9221ef1 | 2017-03-23 16:44:36 +0100 | [diff] [blame] | 7151 | |`real_author` |optional| |
| 7152 | Real author of the message as an |
| 7153 | link:rest-api-accounts.html#account-info[AccountInfo] entity. + |
Edwin Kempin | e03de5f | 2023-01-31 14:54:51 +0100 | [diff] [blame] | 7154 | Only set if the message was posted on behalf of another user. |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 7155 | |`date` || |
| 7156 | The link:rest-api.html#timestamp[timestamp] this message was posted. |
Marija Savtchouk | e40dc1a | 2021-04-07 09:56:12 +0100 | [diff] [blame] | 7157 | |`message` || |
| 7158 | The text left by the user or Gerrit system. Accounts are served as account IDs |
| 7159 | inlined in the text as `<GERRIT_ACCOUNT_18419>`. |
| 7160 | All accounts, used in message, can be found in `accountsInMessage` |
| 7161 | field. |
| 7162 | |`accountsInMessage` ||Accounts, used in `message`. |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 7163 | |`tag` |optional| |
| 7164 | Value of the `tag` field from link:#review-input[ReviewInput] set |
Vitaliy Lotorev | ea88281 | 2018-06-28 20:16:39 +0000 | [diff] [blame] | 7165 | while posting the review. Votes/comments that contain `tag` with |
| 7166 | 'autogenerated:' prefix can be filtered out in the web UI. |
| 7167 | NOTE: To apply different tags on different votes/comments multiple |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 7168 | invocations of the REST call are required. |
John Spurlock | 74a70cc | 2013-03-23 16:41:50 -0400 | [diff] [blame] | 7169 | |`_revision_number` |optional| |
| 7170 | Which patchset (if any) generated this message. |
| 7171 | |================================== |
| 7172 | |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 7173 | [[cherrypick-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7174 | === CherryPickInput |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 7175 | The `CherryPickInput` entity contains information for cherry-picking a change to a new branch. |
| 7176 | |
Alice Kober-Sotzek | f271c25 | 2016-10-12 13:13:54 +0200 | [diff] [blame] | 7177 | [options="header",cols="1,^1,5"] |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 7178 | |=========================== |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7179 | |Field Name ||Description |
| 7180 | |`message` |optional| |
Edwin Kempin | 159804b | 2019-09-23 11:09:39 +0200 | [diff] [blame] | 7181 | Commit message for the cherry-pick change. If not set, the commit message of |
| 7182 | the cherry-picked commit is used. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7183 | |`destination` ||Destination branch |
| 7184 | |`base` |optional| |
Changcheng Xiao | e333258 | 2017-05-26 15:29:41 +0200 | [diff] [blame] | 7185 | 40-hex digit SHA-1 of the commit which will be the parent commit of the newly created change. |
| 7186 | If set, it must be a merged commit or a change revision on the destination branch. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7187 | |`parent` |optional, defaults to 1| |
Alice Kober-Sotzek | f271c25 | 2016-10-12 13:13:54 +0200 | [diff] [blame] | 7188 | Number of the parent relative to which the cherry-pick should be considered. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7189 | |`notify` |optional| |
Changcheng Xiao | e04e846 | 2017-05-23 09:39:03 +0200 | [diff] [blame] | 7190 | Notify handling that defines to whom email notifications should be sent |
| 7191 | after the cherry-pick. + |
| 7192 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
Saša Živkov | 357e2bd | 2020-06-12 12:06:07 +0200 | [diff] [blame] | 7193 | If not set, the default is `ALL`. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7194 | |`notify_details` |optional| |
Changcheng Xiao | e04e846 | 2017-05-23 09:39:03 +0200 | [diff] [blame] | 7195 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 7196 | of link:user-notify.html#recipient-types[recipient type] to |
| 7197 | link:#notify-info[NotifyInfo] entity. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7198 | |`keep_reviewers` |optional, defaults to false| |
Edwin Kempin | 5ac370d | 2018-10-05 13:39:34 +0200 | [diff] [blame] | 7199 | If `true`, carries reviewers and ccs over from original change to newly created one. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7200 | |`allow_conflicts` |optional, defaults to false| |
Edwin Kempin | 5ac370d | 2018-10-05 13:39:34 +0200 | [diff] [blame] | 7201 | If `true`, the cherry-pick uses content merge and succeeds also if |
| 7202 | there are conflicts. If there are conflicts the file contents of the |
| 7203 | created change contain git conflict markers to indicate the conflicts. |
| 7204 | Callers can find out if there were conflicts by checking the |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7205 | `contains_git_conflicts` field in the link:#change-info[ChangeInfo]. If |
| 7206 | there are conflicts the cherry-pick change is marked as |
Edwin Kempin | 3c4113a | 2018-10-12 10:49:33 +0200 | [diff] [blame] | 7207 | work-in-progress. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7208 | |`topic` |optional| |
Gal Paikin | f3abd3c | 2020-03-24 16:39:20 +0100 | [diff] [blame] | 7209 | The topic of the created cherry-picked change. If not set, the default depends |
| 7210 | on the source. If the source is a change with a topic, the resulting topic |
| 7211 | of the cherry-picked change will be {source_change_topic}-{destination_branch}. |
| 7212 | Otherwise, if the source change has no topic, or the source is a commit, |
| 7213 | the created change will have no topic. |
Gal Paikin | 1f83c20 | 2020-03-31 16:23:41 +0200 | [diff] [blame] | 7214 | If the change already exists, the topic will not change if not set. If set, the |
| 7215 | topic will be overridden. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7216 | |`allow_empty` |optional, defaults to false| |
Gal Paikin | 626abe0 | 2020-04-07 12:21:26 +0200 | [diff] [blame] | 7217 | If `true`, the cherry-pick succeeds also if the created commit will be empty. |
| 7218 | If `false`, a cherry-pick that would create an empty commit fails without creating |
| 7219 | the commit. |
Edwin Kempin | bd2d7ab | 2022-02-10 07:54:11 +0100 | [diff] [blame] | 7220 | |`validation_options`|optional| |
| 7221 | Map with key-value pairs that are forwarded as options to the commit validation |
| 7222 | listeners (e.g. can be used to skip certain validations). Which validation |
| 7223 | options are supported depends on the installed commit validation listeners. |
| 7224 | Gerrit core doesn't support any validation options, but commit validation |
| 7225 | listeners that are implemented in plugins may. Please refer to the |
| 7226 | documentation of the installed plugins to learn whether they support validation |
| 7227 | options. Unknown validation options are silently ignored. |
Gustaf Lundh | 019fb26 | 2012-11-28 14:20:22 +0100 | [diff] [blame] | 7228 | |=========================== |
| 7229 | |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7230 | [[comment-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7231 | === CommentInfo |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 7232 | The `CommentInfo` entity contains information about an inline comment. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7233 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7234 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7235 | |=========================== |
| 7236 | |Field Name ||Description |
Dave Borowitz | 23fec2b | 2015-04-28 17:40:07 -0700 | [diff] [blame] | 7237 | |`patch_set` |optional| |
| 7238 | The patch set number for the comment; only set in contexts where + |
| 7239 | comments may be returned for multiple patch sets. |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 7240 | |`id` ||The URL encoded UUID of the comment. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7241 | |`path` |optional| |
Gal Paikin | 3edc142 | 2020-03-19 12:04:52 +0100 | [diff] [blame] | 7242 | link:#file-id[The file path] for which the inline comment was done. + |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7243 | Not set if returned in a map where the key is the file path. |
| 7244 | |`side` |optional| |
| 7245 | The side on which the comment was added. + |
| 7246 | Allowed values are `REVISION` and `PARENT`. + |
| 7247 | If not set, the default is `REVISION`. |
Dawid Grzegorczyk | 5904524 | 2015-11-07 11:26:02 +0100 | [diff] [blame] | 7248 | |`parent` |optional| |
| 7249 | The 1-based parent number. Used only for merge commits when `side == PARENT`. |
| 7250 | When not set the comment is for the auto-merge tree. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7251 | |`line` |optional| |
| 7252 | The number of the line for which the comment was done. + |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7253 | If range is set, this equals the end line of the range. + |
| 7254 | If neither line nor range is set, it's a file comment. |
| 7255 | |`range` |optional| |
David Pursehouse | 8d869ea | 2014-08-26 14:09:53 +0900 | [diff] [blame] | 7256 | The range of the comment as a link:#comment-range[CommentRange] |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7257 | entity. |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7258 | |`in_reply_to` |optional| |
| 7259 | The URL encoded UUID of the comment to which this comment is a reply. |
| 7260 | |`message` |optional|The comment message. |
| 7261 | |`updated` || |
| 7262 | The link:rest-api.html#timestamp[timestamp] of when this comment was |
| 7263 | written. |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 7264 | |`author` |optional| |
David Pursehouse | c633a57 | 2013-08-26 14:01:59 +0900 | [diff] [blame] | 7265 | The author of the message as an |
John Spurlock | 5e402f0 | 2013-03-24 11:35:04 -0400 | [diff] [blame] | 7266 | link:rest-api-accounts.html#account-info[AccountInfo] entity. + |
| 7267 | Unset for draft comments, assumed to be the calling user. |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 7268 | |`tag` |optional| |
| 7269 | Value of the `tag` field from link:#review-input[ReviewInput] set |
| 7270 | while posting the review. |
Sven Selberg | 1a6728d | 2018-09-28 12:30:12 +0200 | [diff] [blame] | 7271 | NOTE: To apply different tags on different votes/comments multiple |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 7272 | invocations of the REST call are required. |
Kasper Nilsson | 7ec3036 | 2016-12-20 14:13:21 -0800 | [diff] [blame] | 7273 | |`unresolved` |optional| |
| 7274 | Whether or not the comment must be addressed by the user. The state of |
| 7275 | resolution of a comment thread is stored in the last comment in that thread |
| 7276 | chronologically. |
Youssef Elghareeb | 7fdfa44 | 2020-02-03 12:00:52 +0100 | [diff] [blame] | 7277 | |`change_message_id` |optional| |
Youssef Elghareeb | 5bd4e4e | 2020-08-13 17:09:42 +0200 | [diff] [blame] | 7278 | Available with the link:#list-change-comments[list change comments] endpoint. |
| 7279 | Contains the link:rest-api-changes.html#change-message-info[id] of the change |
| 7280 | message that this comment is linked to. |
Youssef Elghareeb | b5e4208 | 2020-07-09 15:24:01 +0200 | [diff] [blame] | 7281 | |`commit_id` |optional| |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 7282 | Hex commit SHA-1 (40 characters string) of the commit of the patchset to which |
Youssef Elghareeb | b5e4208 | 2020-07-09 15:24:01 +0200 | [diff] [blame] | 7283 | this comment applies. |
Youssef Elghareeb | 5c4fffb | 2020-07-10 19:14:57 +0200 | [diff] [blame] | 7284 | |`context_lines` |optional| |
| 7285 | A list of link:#context-line[ContextLine] containing the lines of the source |
Youssef Elghareeb | 68e87b6 | 2021-01-11 13:20:03 +0100 | [diff] [blame] | 7286 | file where the comment was written. Available only if the "enable-context" |
Youssef Elghareeb | 5c4fffb | 2020-07-10 19:14:57 +0200 | [diff] [blame] | 7287 | parameter (see link:#list-change-comments[List Change Comments]) is set. |
Youssef Elghareeb | 27d6201 | 2021-02-23 18:21:46 +0100 | [diff] [blame] | 7288 | |`source_content_type` |optional| |
| 7289 | Mime type of the file where the comment is written. Available only if the |
| 7290 | "enable-context" parameter (see link:#list-change-comments[List Change Comments]) |
| 7291 | is set. |
Youssef Elghareeb | 5c4fffb | 2020-07-10 19:14:57 +0200 | [diff] [blame] | 7292 | |
Edwin Kempin | cb6724a | 2013-02-26 16:58:51 +0100 | [diff] [blame] | 7293 | |=========================== |
| 7294 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 7295 | [[comment-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7296 | === CommentInput |
Orgad Shaneh | c99da3a | 2014-06-13 14:57:54 +0300 | [diff] [blame] | 7297 | The `CommentInput` entity contains information for creating an inline |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 7298 | comment. |
| 7299 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7300 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 7301 | |=========================== |
| 7302 | |Field Name ||Description |
| 7303 | |`id` |optional| |
Edwin Kempin | c09826d7 | 2013-02-26 16:10:39 +0100 | [diff] [blame] | 7304 | The URL encoded UUID of the comment if an existing draft comment should |
| 7305 | be updated. |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 7306 | |`path` |optional| |
Gal Paikin | 3edc142 | 2020-03-19 12:04:52 +0100 | [diff] [blame] | 7307 | link:#file-id[The file path] for which the inline comment should be added. + |
Edwin Kempin | 7faf41e | 2013-02-27 08:17:02 +0100 | [diff] [blame] | 7308 | Doesn't need to be set if contained in a map where the key is the file |
| 7309 | path. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 7310 | |`side` |optional| |
| 7311 | The side on which the comment should be added. + |
| 7312 | Allowed values are `REVISION` and `PARENT`. + |
| 7313 | If not set, the default is `REVISION`. |
| 7314 | |`line` |optional| |
| 7315 | The number of the line for which the comment should be added. + |
| 7316 | `0` if it is a file comment. + |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7317 | If neither line nor range is set, a file comment is added. + |
David Pursehouse | 4a159a1 | 2014-08-26 15:45:14 +0900 | [diff] [blame] | 7318 | 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] | 7319 | |`range` |optional| |
David Pursehouse | 8d869ea | 2014-08-26 14:09:53 +0900 | [diff] [blame] | 7320 | The range of the comment as a link:#comment-range[CommentRange] |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7321 | entity. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 7322 | |`in_reply_to` |optional| |
| 7323 | 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] | 7324 | |`updated` |optional| |
| 7325 | The link:rest-api.html#timestamp[timestamp] of this comment. + |
| 7326 | Accepted but ignored. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 7327 | |`message` |optional| |
| 7328 | The comment message. + |
| 7329 | If not set and an existing draft comment is updated, the existing draft |
| 7330 | comment is deleted. |
Dave Borowitz | 3dd203b | 2016-04-19 13:52:41 -0400 | [diff] [blame] | 7331 | |`tag` |optional, drafts only| |
| 7332 | Value of the `tag` field. Only allowed on link:#create-draft[draft comment] + |
| 7333 | inputs; for published comments, use the `tag` field in + |
Gal Paikin | b2b81f2 | 2020-02-26 13:14:08 +0100 | [diff] [blame] | 7334 | link:#review-input[ReviewInput]. Votes/comments that contain `tag` with |
Vitaliy Lotorev | ea88281 | 2018-06-28 20:16:39 +0000 | [diff] [blame] | 7335 | 'autogenerated:' prefix can be filtered out in the web UI. |
Kasper Nilsson | 7ec3036 | 2016-12-20 14:13:21 -0800 | [diff] [blame] | 7336 | |`unresolved` |optional| |
| 7337 | Whether or not the comment must be addressed by the user. This value will |
| 7338 | default to false if the comment is an orphan, or the value of the `in_reply_to` |
| 7339 | comment if it is supplied. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 7340 | |=========================== |
| 7341 | |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7342 | [[comment-range]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7343 | === CommentRange |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7344 | The `CommentRange` entity describes the range of an inline comment. |
| 7345 | |
Quinten Yearsley | 3178671 | 2018-07-16 13:44:33 -0700 | [diff] [blame] | 7346 | The comment range is a range from the start position, specified by `start_line` |
| 7347 | and `start_character`, to the end position, specified by `end_line` and |
| 7348 | `end_character`. The start position is *inclusive* and the end position is |
| 7349 | *exclusive*. |
| 7350 | |
| 7351 | So, a range over part of a line will have `start_line` equal to |
| 7352 | `end_line`; however a range with `end_line` set to 5 and `end_character` equal |
| 7353 | to 0 will not include any characters on line 5, |
| 7354 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7355 | [options="header",cols="1,^1,5"] |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7356 | |=========================== |
Quinten Yearsley | 3178671 | 2018-07-16 13:44:33 -0700 | [diff] [blame] | 7357 | |Field Name ||Description |
| 7358 | |`start_line` ||The start line number of the range. (1-based) |
| 7359 | |`start_character` ||The character position in the start line. (0-based) |
| 7360 | |`end_line` ||The end line number of the range. (1-based) |
| 7361 | |`end_character` ||The character position in the end line. (0-based) |
Michael Zhou | 596c768 | 2013-08-25 05:43:34 -0400 | [diff] [blame] | 7362 | |=========================== |
| 7363 | |
Youssef Elghareeb | 5c4fffb | 2020-07-10 19:14:57 +0200 | [diff] [blame] | 7364 | [[context-line]] |
| 7365 | === ContextLine |
| 7366 | The `ContextLine` entity contains the line number and line text of a single |
| 7367 | line of the source file content. |
| 7368 | |
| 7369 | [options="header",cols="1,6"] |
| 7370 | |=========================== |
| 7371 | |Field Name |Description |
| 7372 | |`line_number` |The line number of the source line. |
| 7373 | |`context_line` |String containing the line text. |
| 7374 | |=========================== |
| 7375 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7376 | [[commit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7377 | === CommitInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7378 | The `CommitInfo` entity contains information about a commit. |
| 7379 | |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 7380 | [options="header",cols="1,^1,5"] |
| 7381 | |=========================== |
| 7382 | |Field Name ||Description |
Edwin Kempin | c823740 | 2015-07-15 18:27:55 +0200 | [diff] [blame] | 7383 | |`commit` |Optional| |
| 7384 | The commit ID. Not set if included in a link:#revision-info[ |
| 7385 | RevisionInfo] entity that is contained in a map which has the commit ID |
| 7386 | as key. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 7387 | |`parents` || |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7388 | The parent commits of this commit as a list of |
Edwin Kempin | cecf90a | 2014-04-09 14:58:35 +0200 | [diff] [blame] | 7389 | link:#commit-info[CommitInfo] entities. In each parent |
| 7390 | only the `commit` and `subject` fields are populated. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 7391 | |`author` ||The author of the commit as a |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7392 | link:#git-person-info[GitPersonInfo] entity. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 7393 | |`committer` ||The committer of the commit as a |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7394 | link:#git-person-info[GitPersonInfo] entity. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 7395 | |`subject` || |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7396 | The subject of the commit (header line of the commit message). |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 7397 | |`message` ||The commit message. |
Sven Selberg | d26bd54 | 2014-11-21 16:28:10 +0100 | [diff] [blame] | 7398 | |`web_links` |optional| |
Frank Borden | df69edb | 2021-05-05 17:00:15 +0200 | [diff] [blame] | 7399 | Links to the patch set in external sites as a list of |
| 7400 | link:#web-link-info[WebLinkInfo] entities. |
| 7401 | |`resolve_conflicts_web_links` |optional| |
| 7402 | Links to the commit in external sites for resolving conflicts as a list of |
Sven Selberg | d26bd54 | 2014-11-21 16:28:10 +0100 | [diff] [blame] | 7403 | link:#web-link-info[WebLinkInfo] entities. |
Edwin Kempin | f0c5715 | 2015-07-15 18:18:24 +0200 | [diff] [blame] | 7404 | |=========================== |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7405 | |
Patrick Hiesel | fda9645 | 2017-06-14 16:44:54 +0200 | [diff] [blame] | 7406 | [[commit-message-input]] |
| 7407 | === CommitMessageInput |
| 7408 | The `CommitMessageInput` entity contains information for changing |
| 7409 | the commit message of a change. |
| 7410 | |
| 7411 | [options="header",cols="1,^1,5"] |
| 7412 | |============================= |
| 7413 | |Field Name ||Description |
| 7414 | |`message` ||New commit message. |
| 7415 | |`notify` |optional| |
| 7416 | Notify handling that defines to whom email notifications should be sent |
| 7417 | after the commit message was updated. + |
| 7418 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
Logan Hanks | a1e68dc | 2017-06-29 15:13:27 -0700 | [diff] [blame] | 7419 | If not set, the default is `OWNER` for WIP changes and `ALL` otherwise. |
Patrick Hiesel | fda9645 | 2017-06-14 16:44:54 +0200 | [diff] [blame] | 7420 | |`notify_details`|optional| |
| 7421 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 7422 | of link:user-notify.html#recipient-types[recipient type] to |
| 7423 | link:#notify-info[NotifyInfo] entity. |
Patrick Hiesel | fda9645 | 2017-06-14 16:44:54 +0200 | [diff] [blame] | 7424 | |============================= |
| 7425 | |
Changcheng Xiao | 6d4ee64 | 2018-04-25 11:43:19 +0200 | [diff] [blame] | 7426 | [[delete-change-message-input]] |
| 7427 | === DeleteChangeMessageInput |
| 7428 | The `DeleteChangeMessageInput` entity contains the options for deleting a change message. |
| 7429 | |
| 7430 | [options="header",cols="1,^1,5"] |
| 7431 | |============================= |
| 7432 | |Field Name ||Description |
| 7433 | |`reason` |optional| |
| 7434 | The reason why the change message should be deleted. + |
| 7435 | If set, the change message will be replaced with |
| 7436 | "Change message removed by: `name`\nReason: `reason`", |
| 7437 | or just "Change message removed by: `name`." if not set. |
| 7438 | |============================= |
| 7439 | |
Changcheng Xiao | e5b14ce | 2017-02-10 09:39:48 +0100 | [diff] [blame] | 7440 | [[delete-comment-input]] |
| 7441 | === DeleteCommentInput |
| 7442 | The `DeleteCommentInput` entity contains the option for deleting a comment. |
| 7443 | |
| 7444 | [options="header",cols="1,^1,5"] |
| 7445 | |============================= |
| 7446 | |Field Name ||Description |
| 7447 | |`reason` |optional| |
| 7448 | The reason why the comment should be deleted. + |
| 7449 | If set, the comment's message will be replaced with |
| 7450 | "Comment removed by: `name`; Reason: `reason`", |
| 7451 | or just "Comment removed by: `name`." if not set. |
| 7452 | |============================= |
| 7453 | |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 7454 | [[delete-reviewer-input]] |
| 7455 | === DeleteReviewerInput |
| 7456 | The `DeleteReviewerInput` entity contains options for the deletion of a |
| 7457 | reviewer. |
| 7458 | |
| 7459 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7460 | |============================= |
| 7461 | |Field Name ||Description |
| 7462 | |`notify` |optional| |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 7463 | Notify handling that defines to whom email notifications should be sent |
| 7464 | after the reviewer is deleted. + |
| 7465 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 7466 | If not set, the default is `ALL`. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7467 | |`notify_details`|optional| |
| 7468 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 7469 | of link:user-notify.html#recipient-types[recipient type] to |
| 7470 | link:#notify-info[NotifyInfo] entity. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7471 | |============================= |
Edwin Kempin | 407fca3 | 2016-08-29 12:01:00 +0200 | [diff] [blame] | 7472 | |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 7473 | [[delete-vote-input]] |
| 7474 | === DeleteVoteInput |
| 7475 | The `DeleteVoteInput` entity contains options for the deletion of a |
| 7476 | vote. |
| 7477 | |
| 7478 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7479 | |============================= |
| 7480 | |Field Name ||Description |
| 7481 | |`label` |optional| |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 7482 | The label for which the vote should be deleted. + |
| 7483 | If set, must match the label in the URL. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7484 | |`notify` |optional| |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 7485 | Notify handling that defines to whom email notifications should be sent |
| 7486 | after the vote is deleted. + |
| 7487 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 7488 | If not set, the default is `ALL`. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7489 | |`notify_details`|optional| |
| 7490 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 7491 | of link:user-notify.html#recipient-types[recipient type] to |
| 7492 | link:#notify-info[NotifyInfo] entity. |
Gal Paikin | bd7575d | 2021-11-11 14:42:53 +0100 | [diff] [blame] | 7493 | |`ignore_automatic_attention_set_rules`|optional| |
| 7494 | If set to true, ignore all automatic attention set rules described in the |
| 7495 | link:#attention-set[attention set]. When not set, the default is false. |
Patrick Hiesel | 8c5568a | 2022-05-31 08:33:52 +0200 | [diff] [blame] | 7496 | |`reason` |optional| |
| 7497 | The reason why this vote is deleted. Will + |
| 7498 | go into the change message. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7499 | |============================= |
Edwin Kempin | 1dfecb6 | 2016-06-16 10:45:00 +0200 | [diff] [blame] | 7500 | |
Kasper Nilsson | 9f2ed6a | 2016-11-15 11:12:37 -0800 | [diff] [blame] | 7501 | [[description-input]] |
| 7502 | === DescriptionInput |
| 7503 | The `DescriptionInput` entity contains information for setting a description. |
| 7504 | |
| 7505 | [options="header",cols="1,6"] |
| 7506 | |=========================== |
| 7507 | |Field Name |Description |
| 7508 | |`description` |The description text. |
| 7509 | |=========================== |
| 7510 | |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7511 | [[diff-content]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7512 | === DiffContent |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7513 | The `DiffContent` entity contains information about the content differences |
| 7514 | in a file. |
| 7515 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7516 | [options="header",cols="1,^1,5"] |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7517 | |========================== |
Alice Kober-Sotzek | 2f62486 | 2017-05-04 09:59:28 +0200 | [diff] [blame] | 7518 | |Field Name ||Description |
| 7519 | |`a` |optional|Content only in the file on side A (deleted in B). |
| 7520 | |`b` |optional|Content only in the file on side B (added in B). |
| 7521 | |`ab` |optional|Content in the file on both sides (unchanged). |
Ole Rehmsen | 2374b6b | 2019-07-02 16:06:22 +0200 | [diff] [blame] | 7522 | |`edit_a` |only present when the `intraline` parameter is set and the |
| 7523 | DiffContent is a replace, i.e. both `a` and `b` are present| |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7524 | Text sections deleted from side A as a |
| 7525 | link:#diff-intraline-info[DiffIntralineInfo] entity. |
Ole Rehmsen | 2374b6b | 2019-07-02 16:06:22 +0200 | [diff] [blame] | 7526 | |`edit_b` |only present when the `intraline` parameter is set and the |
| 7527 | DiffContent is a replace, i.e. both `a` and `b` are present| |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7528 | Text sections inserted in side B as a |
| 7529 | link:#diff-intraline-info[DiffIntralineInfo] entity. |
Alice Kober-Sotzek | 2f62486 | 2017-05-04 09:59:28 +0200 | [diff] [blame] | 7530 | |`due_to_rebase`|not set if `false`|Indicates whether this entry was introduced by a |
| 7531 | rebase. |
Renan Oliveira | c5077aa | 2020-09-25 18:11:54 +0200 | [diff] [blame] | 7532 | |`due_to_move`|not set if `false`|Indicates whether this entry was introduced by a |
| 7533 | move operation. |
Alice Kober-Sotzek | 2f62486 | 2017-05-04 09:59:28 +0200 | [diff] [blame] | 7534 | |`skip` |optional|count of lines skipped on both sides when the file is |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7535 | too large to include all common lines. |
Alice Kober-Sotzek | 2f62486 | 2017-05-04 09:59:28 +0200 | [diff] [blame] | 7536 | |`common` |optional|Set to `true` if the region is common according |
Shawn Pearce | 425a2be | 2014-01-02 16:00:58 -0800 | [diff] [blame] | 7537 | to the requested ignore-whitespace parameter, but a and b contain |
| 7538 | differing amounts of whitespace. When present and true a and b are |
| 7539 | used instead of ab. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7540 | |========================== |
| 7541 | |
| 7542 | [[diff-file-meta-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7543 | === DiffFileMetaInfo |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7544 | The `DiffFileMetaInfo` entity contains meta information about a file diff. |
| 7545 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7546 | [options="header",cols="1,^1,5"] |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7547 | |========================== |
Sven Selberg | e7f3f0a | 2014-10-21 11:04:42 +0200 | [diff] [blame] | 7548 | |Field Name ||Description |
| 7549 | |`name` ||The name of the file. |
Youssef Elghareeb | 20a91dd | 2022-02-03 13:46:44 +0100 | [diff] [blame] | 7550 | |`content_type`||The content type of the file. For the commit message and merge |
| 7551 | list the value is `text/x-gerrit-commit-message` and `text/x-gerrit-merge-list` |
| 7552 | respectively. For git links the value is `x-git/gitlink`. For symlinks the value |
| 7553 | is `x-git/symlink`. For regular files the value is the file mime type (e.g. |
| 7554 | `text/x-java`, `text/x-c++src`, etc...). |
Sven Selberg | e7f3f0a | 2014-10-21 11:04:42 +0200 | [diff] [blame] | 7555 | |`lines` ||The total number of lines in the file. |
Edwin Kempin | 26c95a4 | 2014-11-25 16:29:47 +0100 | [diff] [blame] | 7556 | |`web_links` |optional| |
Sven Selberg | e7f3f0a | 2014-10-21 11:04:42 +0200 | [diff] [blame] | 7557 | Links to the file in external sites as a list of |
Shawn Pearce | b62414c | 2014-10-16 22:48:33 -0700 | [diff] [blame] | 7558 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7559 | |========================== |
| 7560 | |
| 7561 | [[diff-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7562 | === DiffInfo |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7563 | The `DiffInfo` entity contains information about the diff of a file |
| 7564 | in a revision. |
| 7565 | |
Edwin Kempin | 8cdce50 | 2014-12-06 10:55:38 +0100 | [diff] [blame] | 7566 | If the link:#weblinks-only[weblinks-only] parameter is specified, only |
| 7567 | the `web_links` field is set. |
| 7568 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7569 | [options="header",cols="1,^1,5"] |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7570 | |========================== |
| 7571 | |Field Name ||Description |
| 7572 | |`meta_a` |not present when the file is added| |
| 7573 | Meta information about the file on side A as a |
| 7574 | link:#diff-file-meta-info[DiffFileMetaInfo] entity. |
| 7575 | |`meta_b` |not present when the file is deleted| |
| 7576 | Meta information about the file on side B as a |
| 7577 | link:#diff-file-meta-info[DiffFileMetaInfo] entity. |
| 7578 | |`change_type` ||The type of change (`ADDED`, `MODIFIED`, `DELETED`, `RENAMED` |
| 7579 | `COPIED`, `REWRITE`). |
| 7580 | |`intraline_status`|only set when the `intraline` parameter was specified in the request| |
| 7581 | Intraline status (`OK`, `ERROR`, `TIMEOUT`). |
| 7582 | |`diff_header` ||A list of strings representing the patch set diff header. |
| 7583 | |`content` ||The content differences in the file as a list of |
| 7584 | link:#diff-content[DiffContent] entities. |
Edwin Kempin | 8cdce50 | 2014-12-06 10:55:38 +0100 | [diff] [blame] | 7585 | |`web_links` |optional| |
| 7586 | Links to the file diff in external sites as a list of |
| 7587 | link:rest-api-changes.html#diff-web-link-info[DiffWebLinkInfo] entries. |
Frank Borden | 1952492 | 2021-05-04 11:40:44 +0200 | [diff] [blame] | 7588 | |`edit_web_links` |optional| |
| 7589 | Links to edit the file in external sites as a list of |
| 7590 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
David Ostrovsky | cdbef23 | 2015-02-13 01:16:37 +0100 | [diff] [blame] | 7591 | |`binary` |not set if `false`|Whether the file is binary. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7592 | |========================== |
| 7593 | |
| 7594 | [[diff-intraline-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7595 | === DiffIntralineInfo |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7596 | The `DiffIntralineInfo` entity contains information about intraline edits in a |
| 7597 | file. |
| 7598 | |
Ole Rehmsen | 2374b6b | 2019-07-02 16:06:22 +0200 | [diff] [blame] | 7599 | The information consists of a list of `<skip length, edit length>` pairs, where |
David Pursehouse | 31203f5 | 2013-06-08 17:05:45 +0900 | [diff] [blame] | 7600 | the skip length is the number of characters between the end of the previous edit |
Ole Rehmsen | 2374b6b | 2019-07-02 16:06:22 +0200 | [diff] [blame] | 7601 | and the start of this edit, and the edit length is the number of edited characters |
David Pursehouse | 31203f5 | 2013-06-08 17:05:45 +0900 | [diff] [blame] | 7602 | following the skip. The start of the edits is from the beginning of the related |
Tao Zhou | 4243048 | 2019-09-13 11:26:01 +0200 | [diff] [blame] | 7603 | diff content lines. If the list is empty, the entire DiffContent should be considered |
| 7604 | as unedited. |
David Pursehouse | 882aef2 | 2013-06-05 10:56:37 +0900 | [diff] [blame] | 7605 | |
David Pursehouse | 31203f5 | 2013-06-08 17:05:45 +0900 | [diff] [blame] | 7606 | 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] | 7607 | 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] | 7608 | |
Edwin Kempin | 8cdce50 | 2014-12-06 10:55:38 +0100 | [diff] [blame] | 7609 | [[diff-web-link-info]] |
| 7610 | === DiffWebLinkInfo |
| 7611 | The `DiffWebLinkInfo` entity describes a link on a diff screen to an |
| 7612 | external site. |
| 7613 | |
| 7614 | [options="header",cols="1,6"] |
| 7615 | |======================= |
| 7616 | |Field Name|Description |
| 7617 | |`name` |The link name. |
| 7618 | |`url` |The link URL. |
| 7619 | |`image_url`|URL to the icon of the link. |
| 7620 | |show_on_side_by_side_diff_view| |
| 7621 | Whether the web link should be shown on the side-by-side diff screen. |
| 7622 | |show_on_unified_diff_view| |
| 7623 | Whether the web link should be shown on the unified diff screen. |
| 7624 | |======================= |
| 7625 | |
Sharad Bagri | bdb582d | 2022-03-26 01:32:35 -0700 | [diff] [blame] | 7626 | [[apply-provided-fix-input]] |
| 7627 | === ApplyProvidedFixInput |
| 7628 | The `ApplyProvidedFixInput` entity contains the fixes to be applied on a review. |
| 7629 | |
| 7630 | [options="header",cols="1,6"] |
| 7631 | |======================= |
| 7632 | |Field Name |Description |
| 7633 | |`fix_replacement_infos` |A list of <<fix-replacement-info,FixReplacementInfo>>. |
| 7634 | |======================= |
| 7635 | |
David Ostrovsky | 9ea9c11 | 2015-01-25 00:12:38 +0100 | [diff] [blame] | 7636 | [[edit-file-info]] |
| 7637 | === EditFileInfo |
| 7638 | The `EditFileInfo` entity contains additional information |
| 7639 | of a file within a change edit. |
| 7640 | |
| 7641 | [options="header",cols="1,^1,5"] |
| 7642 | |=========================== |
| 7643 | |Field Name ||Description |
| 7644 | |`web_links` |optional| |
| 7645 | Links to the diff info in external sites as a list of |
| 7646 | link:#web-link-info[WebLinkInfo] entities. |
| 7647 | |=========================== |
| 7648 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7649 | [[edit-info]] |
| 7650 | === EditInfo |
| 7651 | The `EditInfo` entity contains information about a change edit. |
| 7652 | |
| 7653 | [options="header",cols="1,^1,5"] |
| 7654 | |=========================== |
David Pursehouse | 5934d3f | 2019-01-07 15:23:49 +0900 | [diff] [blame] | 7655 | |Field Name ||Description |
| 7656 | |`commit` ||The commit of change edit as |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7657 | link:#commit-info[CommitInfo] entity. |
David Pursehouse | 5934d3f | 2019-01-07 15:23:49 +0900 | [diff] [blame] | 7658 | |`base_patch_set_number`||The patch set number of the patch set the change edit is based on. |
| 7659 | |`base_revision` ||The revision of the patch set the change edit is based on. |
David Pursehouse | 1bb55ff | 2019-01-07 15:28:22 +0900 | [diff] [blame] | 7660 | |`ref` ||The ref of the change edit. |
David Pursehouse | 5934d3f | 2019-01-07 15:23:49 +0900 | [diff] [blame] | 7661 | |`fetch` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7662 | Information about how to fetch this patch set. The fetch information is |
| 7663 | provided as a map that maps the protocol name ("`git`", "`http`", |
| 7664 | "`ssh`") to link:#fetch-info[FetchInfo] entities. |
David Pursehouse | 5934d3f | 2019-01-07 15:23:49 +0900 | [diff] [blame] | 7665 | |`files` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7666 | The files of the change edit as a map that maps the file names to |
| 7667 | link:#file-info[FileInfo] entities. |
| 7668 | |=========================== |
| 7669 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7670 | [[fetch-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7671 | === FetchInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7672 | The `FetchInfo` entity contains information about how to fetch a patch |
| 7673 | set via a certain protocol. |
| 7674 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7675 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7676 | |========================== |
Edwin Kempin | ea62148 | 2013-10-16 12:58:24 +0200 | [diff] [blame] | 7677 | |Field Name ||Description |
| 7678 | |`url` ||The URL of the project. |
| 7679 | |`ref` ||The ref of the patch set. |
| 7680 | |`commands` |optional| |
| 7681 | The download commands for this patch set as a map that maps the command |
| 7682 | names to the commands. + |
David Pursehouse | 025c1af | 2015-11-20 17:02:50 +0900 | [diff] [blame] | 7683 | Only set if link:#download-commands[download commands] are requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7684 | |========================== |
| 7685 | |
| 7686 | [[file-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7687 | === FileInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7688 | The `FileInfo` entity contains information about a file in a patch set. |
| 7689 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7690 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7691 | |============================= |
| 7692 | |Field Name ||Description |
| 7693 | |`status` |optional| |
| 7694 | The status of the file ("`A`"=Added, "`D`"=Deleted, "`R`"=Renamed, |
| 7695 | "`C`"=Copied, "`W`"=Rewritten). + |
| 7696 | Not set if the file was Modified ("`M`"). |
| 7697 | |`binary` |not set if `false`|Whether the file is binary. |
| 7698 | |`old_path` |optional| |
| 7699 | The old file path. + |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 7700 | Only set if the file was renamed or copied. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7701 | |`lines_inserted`|optional| |
| 7702 | Number of inserted lines. + |
Alice Kober-Sotzek | 7eff37c | 2018-07-05 15:58:50 +0200 | [diff] [blame] | 7703 | Not set for binary files or if no lines were inserted. + |
| 7704 | An empty last line is not included in the count and hence this number can |
Sharad Bagri | 6fc4898 | 2022-06-25 14:11:50 -0700 | [diff] [blame] | 7705 | differ by one from details provided in <<diff-info,DiffInfo>>. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7706 | |`lines_deleted` |optional| |
| 7707 | Number of deleted lines. + |
Alice Kober-Sotzek | 7eff37c | 2018-07-05 15:58:50 +0200 | [diff] [blame] | 7708 | Not set for binary files or if no lines were deleted. + |
| 7709 | An empty last line is not included in the count and hence this number can |
Sharad Bagri | 6fc4898 | 2022-06-25 14:11:50 -0700 | [diff] [blame] | 7710 | differ by one from details provided in <<diff-info,DiffInfo>>. |
Edwin Kempin | 640f984 | 2015-10-08 15:53:20 +0200 | [diff] [blame] | 7711 | |`size_delta` || |
| 7712 | Number of bytes by which the file size increased/decreased. |
Youssef Elghareeb | 1ae12c0 | 2022-06-28 13:49:18 +0200 | [diff] [blame] | 7713 | |`size` || File size in bytes. |
| 7714 | |`old_mode` |optional|File mode in octal (e.g. 100644) at the old commit. |
| 7715 | The first three digits indicate the file type and the last three digits contain |
| 7716 | the file permission bits. For added files, this field will not be present. |
| 7717 | |`new_mode` |optional|File mode in octal (e.g. 100644) at the new commit. |
| 7718 | The first three digits indicate the file type and the last three digits contain |
| 7719 | the file permission bits. For deleted files, this field will not be present. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7720 | |============================= |
| 7721 | |
Dave Borowitz | bad53ee | 2015-06-11 10:10:18 -0400 | [diff] [blame] | 7722 | [[fix-input]] |
| 7723 | === FixInput |
| 7724 | The `FixInput` entity contains options for fixing commits using the |
| 7725 | link:#fix-change[fix change] endpoint. |
| 7726 | |
| 7727 | [options="header",cols="1,6"] |
| 7728 | |========================== |
Dave Borowitz | b50a7ed | 2015-07-27 15:10:36 -0700 | [diff] [blame] | 7729 | |Field Name |Description |
| 7730 | |`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] | 7731 | database if they refer to missing commit options. |
Dave Borowitz | b50a7ed | 2015-07-27 15:10:36 -0700 | [diff] [blame] | 7732 | |`expect_merged_as` |If set, check that the change is |
Dave Borowitz | a828fed | 2015-05-05 14:43:40 -0700 | [diff] [blame] | 7733 | merged into the destination branch as this exact SHA-1. If not, insert |
| 7734 | a new patch set referring to this commit. |
Dave Borowitz | bad53ee | 2015-06-11 10:10:18 -0400 | [diff] [blame] | 7735 | |========================== |
| 7736 | |
Alice Kober-Sotzek | bcd275e | 2016-12-05 16:22:07 +0100 | [diff] [blame] | 7737 | [[fix-suggestion-info]] |
| 7738 | === FixSuggestionInfo |
| 7739 | The `FixSuggestionInfo` entity represents a suggested fix. |
| 7740 | |
| 7741 | [options="header",cols="1,^1,5"] |
| 7742 | |========================== |
| 7743 | |Field Name ||Description |
| 7744 | |`fix_id` |generated, don't set|The <<fix-id,UUID>> of the suggested |
| 7745 | fix. It will be generated automatically and hence will be ignored if it's set |
| 7746 | for input objects. |
| 7747 | |`description` ||A description of the suggested fix. |
| 7748 | |`replacements` ||A list of <<fix-replacement-info,FixReplacementInfo>> |
Alice Kober-Sotzek | 791f4af | 2017-03-16 18:02:15 +0100 | [diff] [blame] | 7749 | entities indicating how the content of one or several files should be modified. |
| 7750 | Within a file, they should refer to non-overlapping regions. |
Alice Kober-Sotzek | bcd275e | 2016-12-05 16:22:07 +0100 | [diff] [blame] | 7751 | |========================== |
| 7752 | |
| 7753 | [[fix-replacement-info]] |
| 7754 | === FixReplacementInfo |
Alice Kober-Sotzek | 110f60f | 2016-12-19 14:53:40 +0100 | [diff] [blame] | 7755 | The `FixReplacementInfo` entity describes how the content of a file should be |
| 7756 | replaced by another content. |
Alice Kober-Sotzek | bcd275e | 2016-12-05 16:22:07 +0100 | [diff] [blame] | 7757 | |
| 7758 | [options="header",cols="1,6"] |
| 7759 | |========================== |
| 7760 | |Field Name |Description |
Alice Kober-Sotzek | 791f4af | 2017-03-16 18:02:15 +0100 | [diff] [blame] | 7761 | |`path` |The path of the file which should be modified. Any file in |
Alice Kober-Sotzek | 368547f | 2020-03-13 22:00:41 +0100 | [diff] [blame] | 7762 | the repository may be modified. The commit message can be modified via the |
| 7763 | magic file `/COMMIT_MSG` though only the part below the generated header of |
| 7764 | that magic file can be modified. References to the header lines will result in |
| 7765 | errors when the fix is applied. |
Alice Kober-Sotzek | bcd275e | 2016-12-05 16:22:07 +0100 | [diff] [blame] | 7766 | |`range` |A <<comment-range,CommentRange>> indicating which content |
Alice Kober-Sotzek | 30d6c7d | 2017-03-09 13:51:02 +0100 | [diff] [blame] | 7767 | of the file should be replaced. Lines in the file are assumed to be separated |
Alice Kober-Sotzek | f0a3f34 | 2020-09-24 14:16:06 +0200 | [diff] [blame] | 7768 | by the line feed character. |
Alice Kober-Sotzek | bcd275e | 2016-12-05 16:22:07 +0100 | [diff] [blame] | 7769 | |`replacement` |The content which should be used instead of the current one. |
| 7770 | |========================== |
| 7771 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7772 | [[git-person-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7773 | === GitPersonInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7774 | The `GitPersonInfo` entity contains information about the |
| 7775 | author/committer of a commit. |
| 7776 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7777 | [options="header",cols="1,6"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7778 | |========================== |
| 7779 | |Field Name |Description |
| 7780 | |`name` |The name of the author/committer. |
| 7781 | |`email` |The email address of the author/committer. |
| 7782 | |`date` |The link:rest-api.html#timestamp[timestamp] of when |
| 7783 | this identity was constructed. |
| 7784 | |`tz` |The timezone offset from UTC of when this identity was |
| 7785 | constructed. |
| 7786 | |========================== |
| 7787 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7788 | [[group-base-info]] |
| 7789 | === GroupBaseInfo |
| 7790 | The `GroupBaseInfo` entity contains base information about the group. |
| 7791 | |
| 7792 | [options="header",cols="1,6"] |
| 7793 | |========================== |
| 7794 | |Field Name |Description |
Edwin Kempin | 703613c | 2016-11-25 16:06:04 +0100 | [diff] [blame] | 7795 | |`id` |The UUID of the group. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7796 | |`name` |The name of the group. |
| 7797 | |========================== |
| 7798 | |
David Pursehouse | d9dac37 | 2016-11-24 19:41:10 +0900 | [diff] [blame] | 7799 | [[hashtags-input]] |
| 7800 | === HashtagsInput |
| 7801 | |
| 7802 | The `HashtagsInput` entity contains information about hashtags to add to, |
| 7803 | and/or remove from, a change. |
| 7804 | |
| 7805 | [options="header",cols="1,^1,5"] |
| 7806 | |======================= |
| 7807 | |Field Name||Description |
| 7808 | |`add` |optional|The list of hashtags to be added to the change. |
Mike Frysinger | 136ecbd | 2021-02-09 14:26:02 -0500 | [diff] [blame] | 7809 | |`remove` |optional|The list of hashtags to be removed from the change. |
David Pursehouse | d9dac37 | 2016-11-24 19:41:10 +0900 | [diff] [blame] | 7810 | |======================= |
| 7811 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7812 | [[included-in-info]] |
| 7813 | === IncludedInInfo |
| 7814 | The `IncludedInInfo` entity contains information about the branches a |
Xinan Lin | dc40ff1 | 2021-07-26 23:26:28 -0700 | [diff] [blame] | 7815 | change was merged into and tags it was tagged with. The branch or tag |
| 7816 | must have 'refs/head/' or 'refs/tags/' prefix respectively. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7817 | |
Edwin Kempin | 78279ba | 2015-05-22 15:22:41 +0200 | [diff] [blame] | 7818 | [options="header",cols="1,^1,5"] |
| 7819 | |======================= |
| 7820 | |Field Name||Description |
| 7821 | |`branches`||The list of branches this change was merged into. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7822 | Each branch is listed without the 'refs/head/' prefix. |
Edwin Kempin | 78279ba | 2015-05-22 15:22:41 +0200 | [diff] [blame] | 7823 | |`tags` ||The list of tags this change was tagged with. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7824 | Each tag is listed without the 'refs/tags/' prefix. |
Edwin Kempin | 78279ba | 2015-05-22 15:22:41 +0200 | [diff] [blame] | 7825 | |`external`|optional|A map that maps a name to a list of external |
| 7826 | systems that include this change, e.g. a list of servers on which this |
| 7827 | change is deployed. |
| 7828 | |======================= |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 7829 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7830 | [[label-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 7831 | === LabelInfo |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7832 | The `LabelInfo` entity contains information about a label on a change, always |
| 7833 | corresponding to the current patch set. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7834 | |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7835 | There are two options that control the contents of `LabelInfo`: |
Dave Borowitz | 7d6aa01 | 2013-06-14 16:53:48 -0700 | [diff] [blame] | 7836 | link:#labels[`LABELS`] and link:#detailed-labels[`DETAILED_LABELS`]. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7837 | |
Youssef Elghareeb | 9b3e021 | 2022-01-21 14:40:18 +0100 | [diff] [blame] | 7838 | * Using `LABELS` will skip the `all.permitted_voting_range` attribute. |
| 7839 | * Using `DETAILED_LABELS` will include the `all.permitted_voting_range` |
| 7840 | attribute. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7841 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7842 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7843 | |=========================== |
| 7844 | |Field Name ||Description |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7845 | |`optional` |not set if `false`| |
| 7846 | Whether the label is optional. Optional means the label may be set, but |
| 7847 | it's neither necessary for submission nor does it block submission if |
| 7848 | set. |
Youssef Elghareeb | 261691a | 2021-11-17 13:01:08 +0100 | [diff] [blame] | 7849 | |`description` |optional| The description of the label. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7850 | |`approved` |optional|One user who approved this label on the change |
| 7851 | (voted the maximum value) as an |
| 7852 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 7853 | |`rejected` |optional|One user who rejected this label on the change |
| 7854 | (voted the minimum value) as an |
| 7855 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 7856 | |`recommended` |optional|One user who recommended this label on the |
| 7857 | change (voted positively, but not the maximum value) as an |
| 7858 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 7859 | |`disliked` |optional|One user who disliked this label on the change |
| 7860 | (voted negatively, but not the minimum value) as an |
| 7861 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
David Ostrovsky | 5292fd7 | 2014-02-27 21:56:35 +0100 | [diff] [blame] | 7862 | |`blocking` |optional|If `true`, the label blocks submit operation. |
| 7863 | If not set, the default is false. |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7864 | |`value` |optional|The voting value of the user who |
| 7865 | recommended/disliked this label on the change if it is not |
| 7866 | "`+1`"/"`-1`". |
Khai Do | 4c91b00 | 2014-04-06 23:27:43 -0700 | [diff] [blame] | 7867 | |`default_value`|optional|The default voting value for the label. |
| 7868 | This value may be outside the range specified in permitted_labels. |
Youssef Elghareeb | 9b3e021 | 2022-01-21 14:40:18 +0100 | [diff] [blame] | 7869 | |votes|optional|A list of integers containing the vote values applied to this |
| 7870 | label at the latest patchset. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7871 | |`all` |optional|List of all approvals for this label as a list |
Aaron Gable | ea8a211 | 2017-04-25 14:18:16 -0700 | [diff] [blame] | 7872 | of link:#approval-info[ApprovalInfo] entities. Items in this list may |
| 7873 | not represent actual votes cast by users; if a user votes on any label, |
Youssef Elghareeb | 9b3e021 | 2022-01-21 14:40:18 +0100 | [diff] [blame] | 7874 | a corresponding ApprovalInfo will appear in this list for all labels. + |
| 7875 | The `permitted_voting_range` attribute is only set if the `DETAILED_LABELS` |
| 7876 | option is requested. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7877 | |`values` |optional|A map of all values that are allowed for this |
| 7878 | label. The map maps the values ("`-2`", "`-1`", " `0`", "`+1`", "`+2`") |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7879 | to the value descriptions. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 7880 | |=========================== |
| 7881 | |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 7882 | [[mergeable-info]] |
| 7883 | === MergeableInfo |
| 7884 | The `MergeableInfo` entity contains information about the mergeability of a |
| 7885 | change. |
| 7886 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 7887 | [options="header",cols="1,^1,5"] |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 7888 | |============================ |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 7889 | |Field Name ||Description |
| 7890 | |`submit_type` || |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 7891 | Submit type used for this change, can be `MERGE_IF_NECESSARY`, |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 7892 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, `MERGE_ALWAYS` or |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 7893 | `CHERRY_PICK`. |
Edwin Kempin | fad66bc | 2020-01-29 10:26:00 +0100 | [diff] [blame] | 7894 | |`strategy` |optional| |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 7895 | The strategy of the merge, can be `recursive`, `resolve`, |
| 7896 | `simple-two-way-in-core`, `ours` or `theirs`. |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 7897 | |`mergeable` || |
Saša Živkov | 499873f | 2014-05-05 13:34:18 +0200 | [diff] [blame] | 7898 | `true` if this change is cleanly mergeable, `false` otherwise |
Edwin Kempin | fad66bc | 2020-01-29 10:26:00 +0100 | [diff] [blame] | 7899 | |`commit_merged` |optional| |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 7900 | `true` if this change is already merged, `false` otherwise |
Edwin Kempin | fad66bc | 2020-01-29 10:26:00 +0100 | [diff] [blame] | 7901 | |`content_merged`|optional| |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 7902 | `true` if the content of this change is already merged, `false` otherwise |
Edwin Kempin | fad66bc | 2020-01-29 10:26:00 +0100 | [diff] [blame] | 7903 | |`conflicts` |optional| |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 7904 | A list of paths with conflicts |
Saša Živkov | 697cab2 | 2014-04-29 16:46:50 +0200 | [diff] [blame] | 7905 | |`mergeable_into`|optional| |
| 7906 | 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] | 7907 | |============================ |
Dave Borowitz | 8815951 | 2013-06-14 14:21:50 -0700 | [diff] [blame] | 7908 | |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 7909 | [[merge-input]] |
| 7910 | === MergeInput |
| 7911 | The `MergeInput` entity contains information about the merge |
| 7912 | |
| 7913 | [options="header",cols="1,^1,5"] |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7914 | |============================== |
| 7915 | |Field Name ||Description |
| 7916 | |`source` || |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 7917 | The source to merge from, e.g. a complete or abbreviated commit SHA-1, |
David Pursehouse | 4abaef93 | 2018-03-18 15:05:08 +0900 | [diff] [blame] | 7918 | a complete reference name, a short reference name under `refs/heads`, `refs/tags`, |
| 7919 | or `refs/remotes` namespace, etc. |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7920 | |`source_branch` |optional| |
Han-Wen Nienhuys | 9ec1f6a | 2020-01-07 17:32:08 +0100 | [diff] [blame] | 7921 | A branch from which `source` is reachable. If specified, |
| 7922 | `source` is checked for visibility and reachability against only this |
| 7923 | branch. This speeds up the operation, especially for large repos with |
| 7924 | many branches. |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7925 | |`strategy` |optional| |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 7926 | The strategy of the merge, can be `recursive`, `resolve`, |
| 7927 | `simple-two-way-in-core`, `ours` or `theirs`, default will use project settings. |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 7928 | |`allow_conflicts`|optional, defaults to false| |
| 7929 | If `true`, creating the merge succeeds also if there are conflicts. + |
| 7930 | If there are conflicts the file contents of the created change contain |
| 7931 | git conflict markers to indicate the conflicts. + |
| 7932 | Callers can find out whether there were conflicts by checking the |
| 7933 | `contains_git_conflicts` field in the link:#change-info[ChangeInfo]. + |
| 7934 | If there are conflicts the change is marked as work-in-progress. + |
| 7935 | This option is not supported for all merge strategies (e.g. it's |
| 7936 | supported for `recursive` and `resolve`, but not for |
| 7937 | `simple-two-way-in-core`). |
| 7938 | |============================== |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 7939 | |
Zhen Chen | b1e07e5 | 2016-09-23 12:59:48 -0700 | [diff] [blame] | 7940 | [[merge-patch-set-input]] |
| 7941 | === MergePatchSetInput |
| 7942 | The `MergePatchSetInput` entity contains information about updating a new |
| 7943 | change by creating a new merge commit. |
| 7944 | |
| 7945 | [options="header",cols="1,^1,5"] |
| 7946 | |================================== |
| 7947 | |Field Name ||Description |
| 7948 | |`subject` |optional| |
| 7949 | The new subject for the change, if not specified, will reuse the current patch |
| 7950 | set's subject |
Han-Wen Nienhuys | bd2af0c | 2020-01-09 16:39:26 +0100 | [diff] [blame] | 7951 | |`inherit_parent` |optional, default to `false`| |
Zhen Chen | b1e07e5 | 2016-09-23 12:59:48 -0700 | [diff] [blame] | 7952 | Use the current patch set's first parent as the merge tip when set to `true`. |
Changcheng Xiao | 9bdedaf | 2017-10-24 09:34:42 +0200 | [diff] [blame] | 7953 | |`base_change` |optional| |
Han-Wen Nienhuys | 69917fe | 2020-01-09 16:39:26 +0100 | [diff] [blame] | 7954 | A link:#change-id[\{change-id\}] that identifies a change. When `inherit_parent` |
Changcheng Xiao | 9bdedaf | 2017-10-24 09:34:42 +0200 | [diff] [blame] | 7955 | is `false`, the merge tip will be the current patch set of the `base_change` if |
| 7956 | it's set. Otherwise, the current branch tip of the destination branch will be used. |
Zhen Chen | b1e07e5 | 2016-09-23 12:59:48 -0700 | [diff] [blame] | 7957 | |`merge` || |
| 7958 | The detail of the source commit for merge as a link:#merge-input[MergeInput] |
| 7959 | entity. |
Patrick Hiesel | e8fc797 | 2020-10-06 13:22:07 +0200 | [diff] [blame] | 7960 | |`author` |optional| |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 7961 | The author of the commit to create. Must be an |
| 7962 | link:rest-api-accounts.html#account-input[AccountInput] entity with at least |
| 7963 | the `name` and `email` fields set. |
Patrick Hiesel | e8fc797 | 2020-10-06 13:22:07 +0200 | [diff] [blame] | 7964 | The caller needs "Forge Author" permission when using this field. |
Nitzan Gur-Furman | bbfd309 | 2022-06-28 14:53:03 +0300 | [diff] [blame] | 7965 | This field does not affect the owner or the committer of the change, which will |
Patrick Hiesel | e8fc797 | 2020-10-06 13:22:07 +0200 | [diff] [blame] | 7966 | continue to use the identity of the caller. |
Zhen Chen | b1e07e5 | 2016-09-23 12:59:48 -0700 | [diff] [blame] | 7967 | |================================== |
| 7968 | |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 7969 | [[move-input]] |
| 7970 | === MoveInput |
| 7971 | The `MoveInput` entity contains information for moving a change to a new branch. |
| 7972 | |
| 7973 | [options="header",cols="1,^1,5"] |
| 7974 | |=========================== |
Michael Zhou | d03fe28 | 2016-04-25 17:13:17 -0400 | [diff] [blame] | 7975 | |Field Name ||Description |
| 7976 | |`destination_branch`||Destination branch |
| 7977 | |`message` |optional| |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 7978 | A message to be posted in this change's comments |
Marija Savtchouk | d89fefc | 2020-12-15 06:46:15 +0000 | [diff] [blame] | 7979 | |`keep_all_votes` |optional, defaults to false| |
Marija Savtchouk | cee6a8f | 2020-12-03 12:58:04 +0000 | [diff] [blame] | 7980 | By default, only veto votes that are blocking the change from submission are moved to |
| 7981 | the destination branch. Using this option is only allowed for administrators, |
| 7982 | because it can affect the submission behaviour of the change (depending on the label access |
| 7983 | configuration and submissions rules). |
Raviteja Sunkara | 791f339 | 2015-11-03 13:24:50 +0530 | [diff] [blame] | 7984 | |=========================== |
| 7985 | |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7986 | [[notify-info]] |
| 7987 | === NotifyInfo |
| 7988 | The `NotifyInfo` entity contains detailed information about who should |
| 7989 | be notified about an update. These notifications are sent out even if a |
| 7990 | `notify` option in the request input disables normal notifications. |
| 7991 | `NotifyInfo` entities are normally contained in a `notify_details` map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 7992 | in the request input where the key is the |
| 7993 | link:user-notify.html#recipient-types[recipient type]. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 7994 | |
| 7995 | [options="header",cols="1,^1,5"] |
| 7996 | |======================= |
| 7997 | |Field Name||Description |
| 7998 | |`accounts`|optional| |
| 7999 | A list of link:rest-api-accounts.html#account-id[account IDs] that |
| 8000 | identify the accounts that should be should be notified. |
| 8001 | |======================= |
| 8002 | |
Edwin Kempin | 364a86b | 2017-04-27 12:34:00 +0200 | [diff] [blame] | 8003 | [[private-input]] |
| 8004 | === PrivateInput |
| 8005 | The `PrivateInput` entity contains information for changing the private |
| 8006 | flag on a change. |
| 8007 | |
| 8008 | [options="header",cols="1,^1,5"] |
| 8009 | |======================= |
| 8010 | |Field Name||Description |
| 8011 | |`message` |optional|Message describing why the private flag was changed. |
| 8012 | |======================= |
| 8013 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 8014 | [[problem-info]] |
| 8015 | === ProblemInfo |
| 8016 | The `ProblemInfo` entity contains a description of a potential consistency problem |
| 8017 | with a change. These are not related to the code review process, but rather |
| 8018 | indicate some inconsistency in Gerrit's database or repository metadata related |
| 8019 | to the enclosing change. |
| 8020 | |
| 8021 | [options="header",cols="1,^1,5"] |
| 8022 | |=========================== |
| 8023 | |Field Name||Description |
| 8024 | |`message` ||Plaintext message describing the problem with the change. |
| 8025 | |`status` |optional| |
| 8026 | The status of fixing the problem (`FIXED`, `FIX_FAILED`). Only set if a |
| 8027 | fix was attempted. |
| 8028 | |`outcome` |optional| |
| 8029 | If `status` is set, an additional plaintext message describing the |
| 8030 | outcome of the fix. |
| 8031 | |=========================== |
| 8032 | |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 8033 | [[publish-change-edit-input]] |
| 8034 | === PublishChangeEditInput |
| 8035 | The `PublishChangeEditInput` entity contains options for the publishing of |
| 8036 | change edit. |
| 8037 | |
| 8038 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8039 | |============================= |
| 8040 | |Field Name ||Description |
| 8041 | |`notify` |optional| |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 8042 | Notify handling that defines to whom email notifications should be sent |
| 8043 | after the change edit is published. + |
| 8044 | Allowed values are `NONE` and `ALL`. + |
| 8045 | If not set, the default is `ALL`. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8046 | |`notify_details`|optional| |
| 8047 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 8048 | of link:user-notify.html#recipient-types[recipient type] to |
| 8049 | link:#notify-info[NotifyInfo] entity. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8050 | |============================= |
Andrii Shyshkalov | 2fa8a06 | 2016-09-08 15:42:07 +0200 | [diff] [blame] | 8051 | |
Patrick Hiesel | bb84fd7 | 2017-08-23 11:11:22 +0200 | [diff] [blame] | 8052 | [[pure-revert-info]] |
| 8053 | === PureRevertInfo |
| 8054 | The `PureRevertInfo` entity describes the result of a pure revert check. |
| 8055 | |
| 8056 | [options="header",cols="1,6"] |
| 8057 | |====================== |
| 8058 | |Field Name |Description |
| 8059 | |`is_pure_revert` |Outcome of the check as boolean. |
| 8060 | |====================== |
| 8061 | |
Dave Borowitz | 6f58dbe | 2015-09-14 12:34:31 -0400 | [diff] [blame] | 8062 | [[push-certificate-info]] |
| 8063 | === PushCertificateInfo |
| 8064 | The `PushCertificateInfo` entity contains information about a push |
| 8065 | certificate provided when the user pushed for review with `git push |
| 8066 | --signed HEAD:refs/for/<branch>`. Only used when signed push is |
| 8067 | link:config-gerrit.html#receive.enableSignedPush[enabled] on the server. |
| 8068 | |
| 8069 | [options="header",cols="1,6"] |
| 8070 | |=========================== |
| 8071 | |Field Name|Description |
| 8072 | |`certificate`|Signed certificate payload and GPG signature block. |
| 8073 | |`key` | |
| 8074 | Information about the key that signed the push, along with any problems |
| 8075 | found while checking the signature or the key itself, as a |
| 8076 | link:rest-api-accounts.html#gpg-key-info[GpgKeyInfo] entity. |
| 8077 | |=========================== |
| 8078 | |
Gabor Somossy | b72d4c6 | 2015-10-20 23:40:07 +0100 | [diff] [blame] | 8079 | [[range-info]] |
| 8080 | === RangeInfo |
| 8081 | The `RangeInfo` entity stores the coordinates of a range. |
| 8082 | |
| 8083 | [options="header",cols="1,6"] |
| 8084 | |=========================== |
| 8085 | |Field Name | Description |
| 8086 | |`start` | First index. |
| 8087 | |`end` | Last index. |
| 8088 | |=========================== |
| 8089 | |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 8090 | [[rebase-input]] |
| 8091 | === RebaseInput |
| 8092 | The `RebaseInput` entity contains information for changing parent when rebasing. |
| 8093 | |
Edwin Kempin | 2f47eb4 | 2022-02-10 12:48:45 +0100 | [diff] [blame] | 8094 | [options="header",cols="1,^1,5"] |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 8095 | |==================================== |
| 8096 | |Field Name ||Description |
| 8097 | |`base` |optional| |
Han-Wen Nienhuys | 37a1cab | 2021-04-01 12:46:00 +0200 | [diff] [blame] | 8098 | The new parent revision. This can be a ref or a SHA-1 to a concrete patchset. + |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 8099 | Alternatively, a change number can be specified, in which case the current |
| 8100 | patch set is inferred. + |
| 8101 | Empty string is used for rebasing directly on top of the target branch, |
| 8102 | which effectively breaks dependency towards a parent change. |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 8103 | |`allow_conflicts` |optional, defaults to false| |
Edwin Kempin | 9a6f054 | 2021-01-13 13:51:42 +0100 | [diff] [blame] | 8104 | If `true`, the rebase also succeeds if there are conflicts. + |
| 8105 | If there are conflicts the file contents of the rebased patch set contain |
| 8106 | git conflict markers to indicate the conflicts. + |
| 8107 | Callers can find out whether there were conflicts by checking the |
| 8108 | `contains_git_conflicts` field in the returned link:#change-info[ChangeInfo]. + |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 8109 | If there are conflicts the change is marked as work-in-progress. + |
| 8110 | Cannot be combined with the `on_behalf_of_uploader` option. |
| 8111 | |`on_behalf_of_uploader`|optional, defaults to false| |
| 8112 | If `true`, the rebase is done on behalf of the uploader. + |
| 8113 | This means the uploader of the current patch set will also be the uploader of |
| 8114 | the rebased patch set. The calling user will be recorded as the real user. + |
| 8115 | Rebasing on behalf of the uploader is only supported for trivial rebases. |
| 8116 | This means this option cannot be combined with the `allow_conflicts` option. + |
| 8117 | In addition, rebasing on behalf of the uploader is only supported for the |
| 8118 | current patch set of a change and not when rebasing a chain. + |
| 8119 | Using this option is not supported when rebasing a chain via the |
| 8120 | link:#rebase-chain[Rebase Chain] REST endpoint. + |
| 8121 | If the caller is the uploader this flag is ignored and a normal rebase is done. |
| 8122 | |`validation_options` |optional| |
Edwin Kempin | e5ec921 | 2022-02-11 13:37:35 +0100 | [diff] [blame] | 8123 | Map with key-value pairs that are forwarded as options to the commit validation |
| 8124 | listeners (e.g. can be used to skip certain validations). Which validation |
| 8125 | options are supported depends on the installed commit validation listeners. |
| 8126 | Gerrit core doesn't support any validation options, but commit validation |
| 8127 | listeners that are implemented in plugins may. Please refer to the |
| 8128 | documentation of the installed plugins to learn whether they support validation |
| 8129 | options. Unknown validation options are silently ignored. |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 8130 | |==================================== |
Zalan Blenessy | 874aed7 | 2015-01-12 13:26:18 +0100 | [diff] [blame] | 8131 | |
Nitzan Gur-Furman | 4655d8b | 2022-12-16 08:46:18 +0100 | [diff] [blame] | 8132 | [[rebase-chain-info]] |
| 8133 | === RebaseChainInfo |
| 8134 | |
| 8135 | The `RebaseChainInfo` entity contains information about a chain of changes |
| 8136 | that were rebased. |
| 8137 | |
| 8138 | [options="header",cols="1,^1,5"] |
| 8139 | |=========================== |
| 8140 | |Field Name ||Description |
| 8141 | |`rebased_changes` ||List of the unsubmitted ancestors, as link:#change-info[ChangeInfo] |
| 8142 | entities. Includes both rebased changes, and previously up-to-date ancestors. The list is ordered by |
| 8143 | ancestry, where the oldest ancestor is the first. |
| 8144 | |`contains_git_conflicts` ||Whether any of the rebased changes has conflicts |
| 8145 | due to rebasing. |
Nitzan Gur-Furman | ca0c55c | 2023-01-11 09:33:38 +0100 | [diff] [blame] | 8146 | |=========================== |
Nitzan Gur-Furman | 4655d8b | 2022-12-16 08:46:18 +0100 | [diff] [blame] | 8147 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 8148 | [[related-change-and-commit-info]] |
| 8149 | === RelatedChangeAndCommitInfo |
| 8150 | |
| 8151 | The `RelatedChangeAndCommitInfo` entity contains information about |
| 8152 | a related change and commit. |
| 8153 | |
| 8154 | [options="header",cols="1,^1,5"] |
| 8155 | |=========================== |
| 8156 | |Field Name ||Description |
Patrick Hiesel | cab6351 | 2017-07-28 10:25:42 +0200 | [diff] [blame] | 8157 | |`project` ||The project of the change or commit. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 8158 | |`change_id` |optional|The Change-Id of the change. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 8159 | |`commit` ||The commit as a |
| 8160 | link:#commit-info[CommitInfo] entity. |
| 8161 | |`_change_number` |optional|The change number. |
| 8162 | |`_revision_number` |optional|The revision number. |
| 8163 | |`_current_revision_number`|optional|The current revision number. |
Stefan Beller | 3e8bd6e | 2015-06-17 09:46:36 -0700 | [diff] [blame] | 8164 | |`status` |optional|The status of the change. The status of |
David Ostrovsky | 6ffb7d9 | 2017-02-13 21:16:58 +0100 | [diff] [blame] | 8165 | the change is one of (`NEW`, `MERGED`, `ABANDONED`). |
Joerg Zieren | 75e9538 | 2022-07-08 11:30:35 +0200 | [diff] [blame] | 8166 | |`submittable` |optional|Boolean indicating whether the change is |
| 8167 | submittable. + |
| 8168 | Only populated if link:#get-related-changes-submittable[requested]. |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 8169 | |=========================== |
| 8170 | |
| 8171 | [[related-changes-info]] |
| 8172 | === RelatedChangesInfo |
| 8173 | The `RelatedChangesInfo` entity contains information about related |
| 8174 | changes. |
| 8175 | |
| 8176 | [options="header",cols="1,6"] |
| 8177 | |=========================== |
| 8178 | |Field Name |Description |
| 8179 | |`changes` |A list of |
| 8180 | link:#related-change-and-commit-info[RelatedChangeAndCommitInfo] entities |
| 8181 | describing the related changes. Sorted by git commit order, newest to |
| 8182 | oldest. Empty if there are no related changes. |
| 8183 | |=========================== |
| 8184 | |
Maxime Guerreiro | d32aedb | 2018-03-22 15:29:10 +0100 | [diff] [blame] | 8185 | |
| 8186 | [[requirement]] |
| 8187 | === Requirement |
| 8188 | The `Requirement` entity contains information about a requirement relative to a change. |
| 8189 | |
Maxime Guerreiro | d32aedb | 2018-03-22 15:29:10 +0100 | [diff] [blame] | 8190 | [options="header",cols="1,^1,5"] |
| 8191 | |=========================== |
| 8192 | |Field Name | |Description |
| 8193 | |`status` | | Status of the requirement. Can be either `OK`, `NOT_READY` or `RULE_ERROR`. |
Sven Selberg | e748e3f | 2020-09-24 13:44:56 +0200 | [diff] [blame] | 8194 | |`fallback_text` | | A human readable reason |
Maxime Guerreiro | d32aedb | 2018-03-22 15:29:10 +0100 | [diff] [blame] | 8195 | |`type` | | |
| 8196 | Alphanumerical (plus hyphens or underscores) string to identify what the requirement is and why it |
| 8197 | was triggered. Can be seen as a class: requirements sharing the same type were created for a similar |
| 8198 | reason, and the data structure will follow one set of rules. |
Maxime Guerreiro | d32aedb | 2018-03-22 15:29:10 +0100 | [diff] [blame] | 8199 | |=========================== |
| 8200 | |
| 8201 | |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 8202 | [[restore-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8203 | === RestoreInput |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 8204 | The `RestoreInput` entity contains information for restoring a change. |
| 8205 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8206 | [options="header",cols="1,^1,5"] |
Edwin Kempin | ed5364b | 2013-02-22 10:39:33 +0100 | [diff] [blame] | 8207 | |=========================== |
| 8208 | |Field Name ||Description |
| 8209 | |`message` |optional| |
| 8210 | Message to be added as review comment to the change when restoring the |
| 8211 | change. |
| 8212 | |=========================== |
| 8213 | |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 8214 | [[revert-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8215 | === RevertInput |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 8216 | The `RevertInput` entity contains information for reverting a change. |
| 8217 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8218 | [options="header",cols="1,^1,5"] |
Edwin Kempin | c6dc7a0 | 2022-04-22 12:02:30 +0200 | [diff] [blame] | 8219 | |================================= |
| 8220 | |Field Name ||Description |
| 8221 | |`message` |optional| |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 8222 | Message to be added as review comment to the change when reverting the |
| 8223 | change. |
Edwin Kempin | c6dc7a0 | 2022-04-22 12:02:30 +0200 | [diff] [blame] | 8224 | |`notify` |optional| |
Edwin Kempin | 0d5be4f5 | 2018-03-14 16:54:24 +0100 | [diff] [blame] | 8225 | Notify handling that defines to whom email notifications should be sent |
| 8226 | for reverting the change. + |
| 8227 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 8228 | If not set, the default is `ALL`. |
Edwin Kempin | c6dc7a0 | 2022-04-22 12:02:30 +0200 | [diff] [blame] | 8229 | |`notify_details` |optional| |
Edwin Kempin | 0d5be4f5 | 2018-03-14 16:54:24 +0100 | [diff] [blame] | 8230 | Additional information about whom to notify about the revert as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 8231 | of link:user-notify.html#recipient-types[recipient type] to |
| 8232 | link:#notify-info[NotifyInfo] entity. |
Edwin Kempin | c6dc7a0 | 2022-04-22 12:02:30 +0200 | [diff] [blame] | 8233 | |`topic` |optional| |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 8234 | Name of the topic for the revert change. If not set, the default for Revert |
| 8235 | endpoint is the topic of the change being reverted, and the default for the |
| 8236 | RevertSubmission endpoint is `revert-{submission_id}-{timestamp.now}`. |
Gal Paikin | 44dbd7e | 2020-04-15 15:23:44 +0200 | [diff] [blame] | 8237 | Topic can't contain quotation marks. |
Edwin Kempin | c6dc7a0 | 2022-04-22 12:02:30 +0200 | [diff] [blame] | 8238 | |`work_in_progress` |optional| |
Youssef Elghareeb | 8609544 | 2021-08-02 18:18:22 +0200 | [diff] [blame] | 8239 | When present, change is marked as Work In Progress. The `notify` input is |
Nitzan Gur-Furman | 08765cb | 2022-10-18 13:27:34 +0200 | [diff] [blame] | 8240 | used if it's present, otherwise it will be overridden to `NONE`. + |
| 8241 | Notifications for the reverted change will only sent once the result change is |
| 8242 | no longer WIP. + |
Youssef Elghareeb | fd02dae | 2020-09-03 21:56:30 +0200 | [diff] [blame] | 8243 | If not set, the default is false. |
Edwin Kempin | c6dc7a0 | 2022-04-22 12:02:30 +0200 | [diff] [blame] | 8244 | |`validation_options`|optional| |
| 8245 | Map with key-value pairs that are forwarded as options to the commit validation |
| 8246 | listeners (e.g. can be used to skip certain validations). Which validation |
| 8247 | options are supported depends on the installed commit validation listeners. |
| 8248 | Gerrit core doesn't support any validation options, but commit validation |
| 8249 | listeners that are implemented in plugins may. Please refer to the |
| 8250 | documentation of the installed plugins to learn whether they support validation |
| 8251 | options. Unknown validation options are silently ignored. |
| 8252 | |================================= |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 8253 | |
| 8254 | [[revert-submission-info]] |
| 8255 | === RevertSubmissionInfo |
Gal Paikin | 64777c7 | 2019-12-18 14:11:13 +0100 | [diff] [blame] | 8256 | The `RevertSubmissionInfo` entity describes the revert changes. |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 8257 | |
| 8258 | [options="header",cols="1,6"] |
Edwin Kempin | 45ec1bb | 2019-10-24 17:19:30 +0200 | [diff] [blame] | 8259 | |============================== |
Gal Paikin | b81f56c | 2019-10-16 14:39:24 +0200 | [diff] [blame] | 8260 | |Field Name | Description |
| 8261 | |`revert_changes` | |
Edwin Kempin | 6e7fb4e | 2019-10-24 17:20:51 +0200 | [diff] [blame] | 8262 | A list of link:#change-info[ChangeInfo] that describes the revert changes. Each |
| 8263 | entity in that list is a revert change that was created in that revert |
| 8264 | submission. |
Edwin Kempin | 45ec1bb | 2019-10-24 17:19:30 +0200 | [diff] [blame] | 8265 | |============================== |
Edwin Kempin | d2ec415 | 2013-02-22 12:17:19 +0100 | [diff] [blame] | 8266 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8267 | [[review-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8268 | === ReviewInfo |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8269 | The `ReviewInfo` entity contains information about a review. |
| 8270 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8271 | [options="header",cols="1,6"] |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8272 | |=========================== |
| 8273 | |Field Name |Description |
| 8274 | |`labels` | |
| 8275 | The labels of the review as a map that maps the label names to the |
| 8276 | voting values. |
| 8277 | |=========================== |
| 8278 | |
Viktar Donich | 316bf7a | 2016-07-06 11:29:01 -0700 | [diff] [blame] | 8279 | [[review-update-info]] |
| 8280 | === ReviewerUpdateInfo |
| 8281 | The `ReviewerUpdateInfo` entity contains information about updates to |
| 8282 | change's reviewers set. |
| 8283 | |
| 8284 | [options="header",cols="1,6"] |
| 8285 | |=========================== |
| 8286 | |Field Name |Description |
| 8287 | |`updated`| |
| 8288 | Timestamp of the update. |
| 8289 | |`updated_by`| |
| 8290 | The account which modified state of the reviewer in question as |
| 8291 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 8292 | |`reviewer`| |
| 8293 | The reviewer account added or removed from the change as an |
| 8294 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
| 8295 | |`state`| |
| 8296 | The reviewer state, one of `REVIEWER`, `CC` or `REMOVED`. |
| 8297 | |=========================== |
| 8298 | |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8299 | [[review-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8300 | === ReviewInput |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8301 | The `ReviewInput` entity contains information for adding a review to a |
| 8302 | revision. |
| 8303 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8304 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8305 | |============================ |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8306 | |Field Name ||Description |
| 8307 | |`message` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8308 | The message to be added as review comment. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8309 | |`tag` |optional| |
Dariusz Luksza | c70e862 | 2016-03-15 14:05:51 +0100 | [diff] [blame] | 8310 | Apply this tag to the review comment message, votes, and inline |
Ben Rohlfs | d9be63f | 2021-02-04 09:01:46 +0100 | [diff] [blame] | 8311 | comments. Tags with an 'autogenerated:' prefix may be used by CI or other |
| 8312 | automated systems to distinguish them from human reviews. If another |
| 8313 | message was posted on a newer patchset, but with the same tag, then the older |
| 8314 | message will be hidden in the UI. Suffixes starting with `~` are not considered, |
| 8315 | so `autogenerated:my-ci-system~trigger` and `autogenerated:my-ci-system~result` |
| 8316 | will be considered being the same tag with regards to the hiding rule. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8317 | |`labels` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8318 | The votes that should be added to the revision as a map that maps the |
| 8319 | label names to the voting values. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8320 | |`comments` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8321 | The comments that should be added as a map that maps a file path to a |
| 8322 | list of link:#comment-input[CommentInput] entities. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8323 | |`robot_comments` |optional| |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 8324 | The robot comments that should be added as a map that maps a file path |
| 8325 | to a list of link:#robot-comment-input[RobotCommentInput] entities. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8326 | |`drafts` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8327 | Draft handling that defines how draft comments are handled that are |
| 8328 | already in the database but that were not also described in this |
| 8329 | input. + |
Dave Borowitz | 3b5fb81 | 2018-01-09 15:21:06 -0500 | [diff] [blame] | 8330 | Allowed values are `PUBLISH`, `PUBLISH_ALL_REVISIONS` and `KEEP`. All values |
| 8331 | except `PUBLISH_ALL_REVISIONS` operate only on drafts for a single revision. + |
Dave Borowitz | c064054 | 2016-10-05 16:19:21 -0400 | [diff] [blame] | 8332 | Only `KEEP` is allowed when used in conjunction with `on_behalf_of`. + |
Dave Borowitz | 3b5fb81 | 2018-01-09 15:21:06 -0500 | [diff] [blame] | 8333 | If not set, the default is `KEEP`. If `on_behalf_of` is set, then no other value |
| 8334 | besides `KEEP` is allowed. |
Youssef Elghareeb | 3e4bf51 | 2021-05-12 18:40:27 +0200 | [diff] [blame] | 8335 | |`draft_ids_to_publish` |optional| |
| 8336 | List of draft IDs to be published. The draft IDs should belong to the current |
| 8337 | user and be valid. If `drafts` is set to `PUBLISH`, then draft IDs should |
| 8338 | contain drafts for the same revision that is requested for review. If `drafts` |
| 8339 | is set to `KEEP`, then `draft_ids_to_publish` will be ignored and no draft |
| 8340 | comments will be published. + |
| 8341 | If not set, the default is to publish all drafts according to the `drafts` field. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8342 | |`notify` |optional| |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8343 | Notify handling that defines to whom email notifications should be sent |
| 8344 | after the review is stored. + |
| 8345 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 8346 | If not set, the default is `ALL`. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8347 | |`notify_details` |optional| |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8348 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 8349 | of link:user-notify.html#recipient-types[recipient type] to |
| 8350 | link:#notify-info[NotifyInfo] entity. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8351 | |`omit_duplicate_comments` |optional| |
Bill Wendling | 692b4ec | 2015-10-19 15:40:57 -0700 | [diff] [blame] | 8352 | If `true`, comments with the same content at the same place will be omitted. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8353 | |`on_behalf_of` |optional| |
Shawn Pearce | 9d78312 | 2013-06-11 18:18:03 -0700 | [diff] [blame] | 8354 | link:rest-api-accounts.html#account-id[\{account-id\}] the review |
| 8355 | should be posted on behalf of. To use this option the caller must |
| 8356 | have been granted `labelAs-NAME` permission for all keys of labels. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8357 | |`reviewers` |optional| |
Patrick Hiesel | cf6d935 | 2017-04-13 10:15:42 +0200 | [diff] [blame] | 8358 | A list of link:rest-api-changes.html#reviewer-input[ReviewerInput] |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8359 | representing reviewers that should be added/removed to/from the change. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8360 | |`ready` |optional| |
Logan Hanks | 53c3601 | 2017-06-30 13:47:54 -0700 | [diff] [blame] | 8361 | If true, and if the change is work in progress, then start review. |
| 8362 | It is an error for both `ready` and `work_in_progress` to be true. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8363 | |`work_in_progress` |optional| |
Logan Hanks | 53c3601 | 2017-06-30 13:47:54 -0700 | [diff] [blame] | 8364 | If true, mark the change as work in progress. It is an error for both |
| 8365 | `ready` and `work_in_progress` to be true. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8366 | |`add_to_attention_set` |optional| |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 8367 | list of link:#attention-set-input[AttentionSetInput] entities to add |
Gal Paikin | e631de2 | 2020-10-29 12:19:11 +0100 | [diff] [blame] | 8368 | to the link:#attention-set[attention set]. Users that are not reviewers, |
| 8369 | ccs, owner, or uploader are silently ignored. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8370 | |`remove_from_attention_set` |optional| |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 8371 | list of link:#attention-set-input[AttentionSetInput] entities to remove |
| 8372 | from the link:#attention-set[attention set]. |
Gal Paikin | 3e984c2 | 2020-07-03 16:44:40 +0300 | [diff] [blame] | 8373 | |`ignore_automatic_attention_set_rules`|optional| |
| 8374 | If set to true, ignore all automatic attention set rules described in the |
Gal Paikin | c326de4 | 2020-06-16 18:49:00 +0300 | [diff] [blame] | 8375 | link:#attention-set[attention set]. Updates in add_to_attention_set |
| 8376 | and remove_from_attention_set are not ignored. |
Edwin Kempin | 67498de | 2013-02-25 16:15:34 +0100 | [diff] [blame] | 8377 | |============================ |
| 8378 | |
Aaron Gable | 843b0c1 | 2017-04-21 08:25:27 -0700 | [diff] [blame] | 8379 | [[review-result]] |
| 8380 | === ReviewResult |
| 8381 | The `ReviewResult` entity contains information regarding the updates |
| 8382 | that were made to a review. |
| 8383 | |
| 8384 | [options="header",cols="1,^1,5"] |
| 8385 | |============================ |
| 8386 | |Field Name ||Description |
| 8387 | |`labels` |optional| |
| 8388 | Map of labels to values after the review was posted. Null if any reviewer |
| 8389 | additions were rejected. |
| 8390 | |`reviewers` |optional| |
| 8391 | Map of account or group identifier to |
Gal Paikin | 721a40b | 2021-04-15 09:30:00 +0200 | [diff] [blame] | 8392 | link:rest-api-changes.html#reviewer-result[ReviewerResult] |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8393 | representing the outcome of adding/removing a reviewer. |
Aaron Gable | 843b0c1 | 2017-04-21 08:25:27 -0700 | [diff] [blame] | 8394 | Absent if no reviewer additions were requested. |
Logan Hanks | e81ad8e | 2017-07-18 09:45:46 -0700 | [diff] [blame] | 8395 | |`ready` |optional| |
| 8396 | If true, the change was moved from WIP to ready for review as a result of this |
| 8397 | action. Not set if false. |
Edwin Kempin | ddcf6f9 | 2022-08-02 11:21:05 +0200 | [diff] [blame] | 8398 | |`error` |optional| |
| 8399 | Error message for non-200 responses. |
Aaron Gable | 843b0c1 | 2017-04-21 08:25:27 -0700 | [diff] [blame] | 8400 | |============================ |
| 8401 | |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 8402 | [[reviewer-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8403 | === ReviewerInfo |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 8404 | The `ReviewerInfo` entity contains information about a reviewer and its |
| 8405 | votes on a change. |
| 8406 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 8407 | `ReviewerInfo` has the same fields as |
| 8408 | link:rest-api-accounts.html#account-info[AccountInfo] and includes |
| 8409 | link:#detailed-accounts[detailed account information]. |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 8410 | In addition `ReviewerInfo` has the following fields: |
| 8411 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8412 | [options="header",cols="1,6"] |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 8413 | |========================== |
| 8414 | |Field Name |Description |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 8415 | |`approvals` | |
| 8416 | 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] | 8417 | approval values ("`-2`", "`-1`", "`0`", "`+1`", "`+2`"). |
Patrick Hiesel | 11873ef | 2017-03-17 17:36:05 +0100 | [diff] [blame] | 8418 | |`_account_id` | |
| 8419 | This field is inherited from `AccountInfo` but is optional here if an |
| 8420 | unregistered reviewer was added by email. See |
| 8421 | link:rest-api-changes.html#add-reviewer[add-reviewer] for details. |
Edwin Kempin | 1dbe19e | 2013-02-22 16:18:58 +0100 | [diff] [blame] | 8422 | |========================== |
| 8423 | |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 8424 | [[reviewer-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8425 | === ReviewerInput |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8426 | The `ReviewerInput` entity contains information for adding or removing |
| 8427 | reviewers to/from the change. |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 8428 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8429 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8430 | |============================= |
| 8431 | |Field Name ||Description |
| 8432 | |`reviewer` || |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 8433 | The link:rest-api-accounts.html#account-id[ID] of one account that |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8434 | should be added/removed as reviewer or the link:rest-api-groups.html#group-id[ |
Han-Wen Nienhuys | e622905 | 2020-01-29 12:51:36 +0100 | [diff] [blame] | 8435 | ID] of one internal group for which all members should be added as reviewers. + |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 8436 | If an ID identifies both an account and a group, only the account is |
| 8437 | added as reviewer to the change. |
Han-Wen Nienhuys | e622905 | 2020-01-29 12:51:36 +0100 | [diff] [blame] | 8438 | External groups, such as LDAP groups, will be silently omitted from a |
| 8439 | link:#set-review[set-review] or |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8440 | link:rest-api-changes.html#add-reviewer[add-reviewer] call. A group can only be |
| 8441 | specified for adding reviewers, not for removing them. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8442 | |`state` |optional| |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8443 | Add reviewer in this state. Possible reviewer states are `REVIEWER`, |
| 8444 | `CC` and `REMOVED`. If not given, defaults to `REVIEWER`. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8445 | |`confirmed` |optional| |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 8446 | Whether adding the reviewer is confirmed. + |
| 8447 | The Gerrit server may be configured to |
| 8448 | link:config-gerrit.html#addreviewer.maxWithoutConfirmation[require a |
| 8449 | confirmation] when adding a group as reviewer that has many members. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8450 | |`notify` |optional| |
Sven Selberg | 4d64f97 | 2016-09-26 16:15:02 +0200 | [diff] [blame] | 8451 | Notify handling that defines to whom email notifications should be sent |
| 8452 | after the reviewer is added. + |
| 8453 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
| 8454 | If not set, the default is `ALL`. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8455 | |`notify_details`|optional| |
| 8456 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 8457 | of link:user-notify.html#recipient-types[recipient type] to |
| 8458 | link:#notify-info[NotifyInfo] entity. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8459 | |============================= |
Edwin Kempin | 392328e | 2013-02-25 12:50:03 +0100 | [diff] [blame] | 8460 | |
Gal Paikin | 721a40b | 2021-04-15 09:30:00 +0200 | [diff] [blame] | 8461 | [[reviewer-result]] |
| 8462 | === ReviewerResult |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8463 | The `ReviewerResult` entity describes the result of modifying reviewers of |
| 8464 | a change. |
Gal Paikin | 721a40b | 2021-04-15 09:30:00 +0200 | [diff] [blame] | 8465 | |
| 8466 | [options="header",cols="1,^1,5"] |
| 8467 | |=========================== |
| 8468 | |Field Name ||Description |
| 8469 | |`input` || |
| 8470 | Value of the `reviewer` field from link:#reviewer-input[ReviewerInput] |
| 8471 | set while adding the reviewer. |
| 8472 | |`reviewers` |optional| |
| 8473 | The newly added reviewers as a list of link:#reviewer-info[ |
| 8474 | ReviewerInfo] entities. |
| 8475 | |`ccs` |optional| |
Gal Paikin | efb4ad5 | 2021-04-15 09:44:40 +0200 | [diff] [blame] | 8476 | The newly CCed accounts as a list of |
| 8477 | link:rest-api-accounts.html#account-info[AccountInfo] entities. This field will |
Gal Paikin | 0184a2b | 2021-04-15 08:58:34 +0200 | [diff] [blame] | 8478 | only appear if the requested `state` for the reviewer was `CC`. |
| 8479 | |`removed` |optional| |
| 8480 | The newly removed accounts as a list of |
| 8481 | link:rest-api-accounts.html#account-info[AccountInfo] entities. |
| 8482 | This field will only appear if the requested `state` for the reviewer was |
| 8483 | `REMOVED`. |
Gal Paikin | 721a40b | 2021-04-15 09:30:00 +0200 | [diff] [blame] | 8484 | |`error` |optional| |
| 8485 | Error message explaining why the reviewer could not be added. + |
| 8486 | If a group was specified in the input and an error is returned, it |
| 8487 | means that none of the members were added as reviewer. |
| 8488 | |`confirm` |`false` if not set| |
| 8489 | Whether adding the reviewer requires confirmation. |
| 8490 | |=========================== |
| 8491 | |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8492 | [[revision-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8493 | === RevisionInfo |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8494 | The `RevisionInfo` entity contains information about a patch set. |
Khai Do | b3139b753 | 2014-09-19 15:13:04 -0700 | [diff] [blame] | 8495 | Not all fields are returned by default. Additional fields can |
| 8496 | be obtained by adding `o` parameters as described in |
| 8497 | link:#list-changes[Query Changes]. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8498 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8499 | [options="header",cols="1,^1,5"] |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8500 | |=========================== |
| 8501 | |Field Name ||Description |
David Pursehouse | 4de4111 | 2016-06-28 09:24:08 +0900 | [diff] [blame] | 8502 | |`kind` ||The change kind. Valid values are `REWORK`, `TRIVIAL_REBASE`, |
| 8503 | `MERGE_FIRST_PARENT_UPDATE`, `NO_CODE_CHANGE`, and `NO_CHANGE`. |
Kasper Nilsson | be3616d | 2018-01-23 14:10:36 -0800 | [diff] [blame] | 8504 | |`_number` ||The patch set number, or `edit` if the patch set is an edit. |
Edwin Kempin | 04cbd34 | 2015-02-19 16:31:22 +0100 | [diff] [blame] | 8505 | |`created` || |
| 8506 | The link:rest-api.html#timestamp[timestamp] of when the patch set was |
| 8507 | created. |
| 8508 | |`uploader` || |
| 8509 | The uploader of the patch set as an |
| 8510 | link:rest-api-accounts.html#account-info[AccountInfo] entity. |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 8511 | |`real_uploader`|optional| |
| 8512 | The real uploader of the patch set as an |
| 8513 | link:rest-api-accounts.html#account-info[AccountInfo] entity. + |
| 8514 | Only set if the upload was done on behalf of another user. |
Edwin Kempin | 4569ced | 2014-11-25 16:45:05 +0100 | [diff] [blame] | 8515 | |`ref` ||The Git reference for the patch set. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8516 | |`fetch` || |
| 8517 | Information about how to fetch this patch set. The fetch information is |
| 8518 | provided as a map that maps the protocol name ("`git`", "`http`", |
Khai Do | b3139b753 | 2014-09-19 15:13:04 -0700 | [diff] [blame] | 8519 | "`ssh`") to link:#fetch-info[FetchInfo] entities. This information is |
| 8520 | only included if a plugin implementing the |
| 8521 | link:intro-project-owner.html#download-commands[download commands] |
| 8522 | interface is installed. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 8523 | |`commit` |optional|The commit of the patch set as |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8524 | link:#commit-info[CommitInfo] entity. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 8525 | |`files` |optional| |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8526 | 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] | 8527 | link:#file-info[FileInfo] entities. Only set if |
| 8528 | link:#current-files[CURRENT_FILES] or link:#all-files[ALL_FILES] |
| 8529 | option is requested. |
Shawn Pearce | 12e5159 | 2013-07-13 22:08:40 -0700 | [diff] [blame] | 8530 | |`actions` |optional| |
Shawn Pearce | dc4a9b2 | 2013-07-12 10:54:38 -0700 | [diff] [blame] | 8531 | Actions the caller might be able to perform on this revision. The |
| 8532 | information is a map of view name to link:#action-info[ActionInfo] |
| 8533 | entities. |
Khai Do | b3139b753 | 2014-09-19 15:13:04 -0700 | [diff] [blame] | 8534 | |`reviewed` |optional| |
| 8535 | Indicates whether the caller is authenticated and has commented on the |
| 8536 | current revision. Only set if link:#reviewed[REVIEWED] option is requested. |
Quinten Yearsley | 28cd212 | 2019-06-10 14:41:13 -0700 | [diff] [blame] | 8537 | |`commit_with_footers` |optional| |
Dave Borowitz | d5ebd9b | 2015-04-23 17:19:34 -0700 | [diff] [blame] | 8538 | If the link:#commit-footers[COMMIT_FOOTERS] option is requested and |
| 8539 | this is the current patch set, contains the full commit message with |
| 8540 | Gerrit-specific commit footers, as if this revision were submitted |
| 8541 | using the link:project-configuration.html#cherry_pick[Cherry Pick] |
| 8542 | submit type. |
Dave Borowitz | 6f58dbe | 2015-09-14 12:34:31 -0400 | [diff] [blame] | 8543 | |`push_certificate` |optional| |
| 8544 | If the link:#push-certificates[PUSH_CERTIFICATES] option is requested, |
| 8545 | contains the push certificate provided by the user when uploading this |
| 8546 | patch set as a link:#push-certificate-info[PushCertificateInfo] entity. |
| 8547 | This field is always set if the option is requested; if no push |
| 8548 | certificate was provided, it is set to an empty object. |
Aaron Gable | 621c9b6 | 2017-04-21 09:24:20 -0700 | [diff] [blame] | 8549 | |`description` |optional| |
| 8550 | The description of this patchset, as displayed in the patchset |
| 8551 | selector menu. May be null if no description is set. |
Edwin Kempin | e344629 | 2013-02-19 16:40:14 +0100 | [diff] [blame] | 8552 | |=========================== |
| 8553 | |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 8554 | [[robot-comment-info]] |
| 8555 | === RobotCommentInfo |
| 8556 | The `RobotCommentInfo` entity contains information about a robot inline |
| 8557 | comment. |
| 8558 | |
Alice Kober-Sotzek | 7d890be | 2020-10-01 17:41:56 +0200 | [diff] [blame] | 8559 | `RobotCommentInfo` has the same fields as <<comment-info,CommentInfo>> |
| 8560 | except for the `unresolved` field which doesn't exist for robot comments. |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 8561 | In addition `RobotCommentInfo` has the following fields: |
| 8562 | |
| 8563 | [options="header",cols="1,^1,5"] |
| 8564 | |=========================== |
Alice Kober-Sotzek | bcd275e | 2016-12-05 16:22:07 +0100 | [diff] [blame] | 8565 | |Field Name ||Description |
| 8566 | |`robot_id` ||The ID of the robot that generated this comment. |
| 8567 | |`robot_run_id` ||An ID of the run of the robot. |
| 8568 | |`url` |optional|URL to more information. |
| 8569 | |`properties` |optional|Robot specific properties as map that maps arbitrary |
| 8570 | keys to values. |
| 8571 | |`fix_suggestions`|optional|Suggested fixes for this robot comment as a list of |
| 8572 | <<fix-suggestion-info,FixSuggestionInfo>> entities. |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 8573 | |=========================== |
| 8574 | |
| 8575 | [[robot-comment-input]] |
| 8576 | === RobotCommentInput |
| 8577 | The `RobotCommentInput` entity contains information for creating an inline |
| 8578 | robot comment. |
| 8579 | |
Alice Kober-Sotzek | 7d890be | 2020-10-01 17:41:56 +0200 | [diff] [blame] | 8580 | [options="header",cols="1,^1,5"] |
| 8581 | |=========================== |
| 8582 | |Field Name ||Description |
| 8583 | |`path` || |
| 8584 | link:#file-id[The file path] for which the inline comment should be added. |
| 8585 | |`side` |optional| |
| 8586 | The side on which the comment should be added. + |
| 8587 | Allowed values are `REVISION` and `PARENT`. + |
| 8588 | If not set, the default is `REVISION`. |
| 8589 | |`line` |optional| |
| 8590 | The number of the line for which the comment should be added. + |
| 8591 | `0` if it is a file comment. + |
| 8592 | If neither line nor range is set, a file comment is added. + |
| 8593 | If range is set, this value is ignored in favor of the `end_line` of the range. |
| 8594 | |`range` |optional| |
| 8595 | The range of the comment as a link:#comment-range[CommentRange] |
| 8596 | entity. |
| 8597 | |`in_reply_to` |optional| |
| 8598 | The URL encoded UUID of the comment to which this comment is a reply. |
| 8599 | |`message` |optional| |
| 8600 | The comment message. |
| 8601 | |`robot_id` ||The ID of the robot that generated this comment. |
| 8602 | |`robot_run_id` ||An ID of the run of the robot. |
| 8603 | |`url` |optional|URL to more information. |
| 8604 | |`properties` |optional|Robot specific properties as map that maps arbitrary |
| 8605 | keys to values. |
| 8606 | |`fix_suggestions`|optional|Suggested fixes for this robot comment as a list of |
| 8607 | <<fix-suggestion-info,FixSuggestionInfo>> entities. |
| 8608 | |=========================== |
Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 8609 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8610 | [[rule-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8611 | === RuleInput |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8612 | The `RuleInput` entity contains information to test a Prolog rule. |
| 8613 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8614 | [options="header",cols="1,^1,5"] |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8615 | |=========================== |
| 8616 | |Field Name ||Description |
| 8617 | |`rule`|| |
| 8618 | Prolog code to execute instead of the code in `refs/meta/config`. |
| 8619 | |`filters`|`RUN` if not set| |
| 8620 | When `RUN` filter rules in the parent projects are called to |
| 8621 | post-process the results of the project specific rule. This |
| 8622 | behavior matches how the rule will execute if installed. + |
| 8623 | If `SKIP` the parent filters are not called, allowing the test |
| 8624 | to return results from the input rule. |
| 8625 | |=========================== |
| 8626 | |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 8627 | [[submit-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8628 | === SubmitInput |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 8629 | The `SubmitInput` entity contains information for submitting a change. |
| 8630 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8631 | [options="header",cols="1,^1,5"] |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8632 | |============================= |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 8633 | |Field Name ||Description |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8634 | |`on_behalf_of` |optional| |
Dave Borowitz | c6d143d | 2016-02-24 12:32:23 -0500 | [diff] [blame] | 8635 | If set, submit the change on behalf of the given user. The value may take any |
| 8636 | format link:rest-api-accounts.html#account-id[accepted by the accounts REST |
| 8637 | API]. Using this option requires |
| 8638 | link:access-control.html#category_submit_on_behalf_of[Submit (On Behalf Of)] |
| 8639 | permission on the branch. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8640 | |`notify` |optional| |
Stephen Li | a5a5ef0 | 2016-03-31 16:55:53 -0700 | [diff] [blame] | 8641 | Notify handling that defines to whom email notifications should be sent after |
| 8642 | the change is submitted. + |
| 8643 | Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + |
Nitzan Gur-Furman | 9da317c | 2022-10-07 11:19:53 +0200 | [diff] [blame] | 8644 | If not set, the default is `ALL`.+ |
| 8645 | Ignored if a post approval diff is present (i.e. if the change is submitted |
| 8646 | with copied approvals), because in this case everyone should be informed |
| 8647 | about the non-reviewed diff which has been applied after the change has been |
| 8648 | approved so that they can take action if the post approval diff looks |
| 8649 | unexpected. In other words if a post approval diff is present `ALL` is |
| 8650 | enforced. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8651 | |`notify_details`|optional| |
| 8652 | Additional information about whom to notify about the update as a map |
Gal Paikin | 1ae8b46 | 2020-07-27 15:50:59 +0300 | [diff] [blame] | 8653 | of link:user-notify.html#recipient-types[recipient type] to |
| 8654 | link:#notify-info[NotifyInfo] entity. |
Edwin Kempin | cd07df4 | 2016-12-01 09:10:09 +0100 | [diff] [blame] | 8655 | |============================= |
Edwin Kempin | 0eddba0 | 2013-02-22 15:30:12 +0100 | [diff] [blame] | 8656 | |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8657 | [[submit-record]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8658 | === SubmitRecord |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8659 | The `SubmitRecord` entity describes results from a submit_rule. |
Dave Borowitz | 6453fce | 2016-09-22 16:11:56 +0200 | [diff] [blame] | 8660 | Fields in this entity roughly correspond to the fields set by `LABELS` |
| 8661 | in link:#label-info[LabelInfo]. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8662 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8663 | [options="header",cols="1,^1,5"] |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8664 | |=========================== |
| 8665 | |Field Name ||Description |
| 8666 | |`status`|| |
| 8667 | `OK`, the change can be submitted. + |
| 8668 | `NOT_READY`, additional labels are required before submit. + |
| 8669 | `CLOSED`, closed changes cannot be submitted. + |
| 8670 | `RULE_ERROR`, rule code failed with an error. |
| 8671 | |`ok`|optional| |
Edwin Kempin | fe29b81 | 2013-03-05 14:52:54 +0100 | [diff] [blame] | 8672 | Map of labels that are approved; an |
| 8673 | link:rest-api-accounts.html#account-info[AccountInfo] identifies the |
| 8674 | voter chosen by the rule. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8675 | |`reject`|optional| |
Edwin Kempin | fe29b81 | 2013-03-05 14:52:54 +0100 | [diff] [blame] | 8676 | Map of labels that are preventing submit; |
| 8677 | link:rest-api-accounts.html#account-info[AccountInfo] identifies voter. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8678 | |`need`|optional| |
| 8679 | Map of labels that need to be given to submit. The value is |
| 8680 | currently an empty object. |
| 8681 | |`may`|optional| |
| 8682 | Map of labels that can be used, but do not affect submit. |
Edwin Kempin | fe29b81 | 2013-03-05 14:52:54 +0100 | [diff] [blame] | 8683 | link:rest-api-accounts.html#account-info[AccountInfo] identifies voter, |
| 8684 | if the label has been applied. |
Shawn Pearce | b1f730b | 2013-03-04 07:54:09 -0800 | [diff] [blame] | 8685 | |`impossible`|optional| |
| 8686 | Map of labels that should have been in `need` but cannot be |
| 8687 | used by any user because of access restrictions. The value |
| 8688 | is currently an empty object. |
| 8689 | |`error_message`|optional| |
| 8690 | When status is RULE_ERROR this message provides some text describing |
| 8691 | the failure of the rule predicate. |
| 8692 | |=========================== |
| 8693 | |
Youssef Elghareeb | 02d33aa | 2021-10-04 13:24:52 +0200 | [diff] [blame] | 8694 | [[submit-record-info]] |
| 8695 | === SubmitRecordInfo |
| 8696 | The `SubmitRecordInfo` entity describes results from a submit_rule. |
| 8697 | |
| 8698 | [options="header",cols="1,^1,5"] |
| 8699 | |=========================== |
| 8700 | |Field Name ||Description |
| 8701 | |`rule_name`|| |
| 8702 | The name of the submit rule that created this submit record. The submit rule is |
| 8703 | specified in the form of "$plugin~$rule" where `$plugin` is the plugin name |
| 8704 | and `$rule` is the name of the class that implemented the submit rule. |
| 8705 | |`status`|| |
| 8706 | `OK`, the change can be submitted. + |
| 8707 | `NOT_READY`, additional labels are required before submit. + |
| 8708 | `CLOSED`, closed changes cannot be submitted. + |
| 8709 | `FORCED`, the change was submitted bypassing the submit rule. + |
| 8710 | `RULE_ERROR`, rule code failed with an error. |
| 8711 | |`labels`|optional| |
| 8712 | A list of labels, each containing the following fields. + |
| 8713 | * `label`: the label name. + |
| 8714 | * `status`: the label status: {`OK`, `REJECT`, `MAY`, `NEED`, `IMPOSSIBLE`}. + |
| 8715 | * `appliedBy`: the link:rest-api-accounts.html#account-info[AccountInfo] |
| 8716 | that applied the vote to the label. |
| 8717 | |`requirements`|optional| |
| 8718 | List of the link:rest-api-changes.html#requirement[requirements] to be met |
| 8719 | before this change can be submitted. |
| 8720 | |`error_message`|optional| |
| 8721 | When status is RULE_ERROR this message provides some text describing |
| 8722 | the failure of the rule predicate. |
| 8723 | |=========================== |
| 8724 | |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8725 | [[submit-requirement-expression-info]] |
| 8726 | === SubmitRequirementExpressionInfo |
| 8727 | The `SubmitRequirementExpressionInfo` describes the result of evaluating a |
| 8728 | single submit requirement expression, for example `label:code-review=+2`. |
| 8729 | |
Youssef Elghareeb | 08d4cae | 2021-10-27 15:43:05 +0200 | [diff] [blame] | 8730 | [options="header",cols="1,^1,5"] |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8731 | |=========================== |
Youssef Elghareeb | 08d4cae | 2021-10-27 15:43:05 +0200 | [diff] [blame] | 8732 | |Field Name ||Description |
| 8733 | |`expression`|optional| |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8734 | The submit requirement expression as a string, for example |
| 8735 | `branch:refs/heads/foo and label:verified=+1`. |
Youssef Elghareeb | 08d4cae | 2021-10-27 15:43:05 +0200 | [diff] [blame] | 8736 | |`fulfilled`|| |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8737 | True if the submit requirement is fulfilled for the change. |
Youssef Elghareeb | df62c5a | 2022-04-08 12:23:23 +0200 | [diff] [blame] | 8738 | |`status`|| |
| 8739 | A string containing the status of evaluating the expression which can be one |
| 8740 | of the following: + |
| 8741 | * `PASS` - expression was evaluated and result is true. + |
| 8742 | * `FAIL` - expression was evaluated and result is false. + |
| 8743 | * `ERROR` - an error occurred while evaluating the expression. + |
| 8744 | * `NOT_EVALUATED` - expression was not evaluated. |
Youssef Elghareeb | 08d4cae | 2021-10-27 15:43:05 +0200 | [diff] [blame] | 8745 | |`passing_atoms`|optional| |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8746 | A list of passing atoms as strings. For the above expression, |
| 8747 | `passing_atoms` can contain ["branch:refs/heads/foo"] if the branch predicate is |
| 8748 | fulfilled for the change. |
Youssef Elghareeb | 08d4cae | 2021-10-27 15:43:05 +0200 | [diff] [blame] | 8749 | |`failing_atoms`|optional| |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8750 | A list of failing atoms. This is similar to `passing_atoms` except that it |
| 8751 | contains the list of predicates that are not fulfilled for the change. |
Youssef Elghareeb | 393be61 | 2021-11-16 13:39:33 +0100 | [diff] [blame] | 8752 | |`error_message`|optional| |
| 8753 | If the submit requirement fails during evaluation, this string will contain |
| 8754 | an error message describing why it failed. |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8755 | |=========================== |
| 8756 | |
Youssef Elghareeb | d598693 | 2021-10-15 11:45:23 +0200 | [diff] [blame] | 8757 | [[submit-requirement-input]] |
| 8758 | === SubmitRequirementInput |
| 8759 | The `SubmitRequirementInput` entity describes a submit requirement. |
| 8760 | |
| 8761 | [options="header",cols="1,^1,5"] |
| 8762 | |=========================== |
| 8763 | |Field Name ||Description |
| 8764 | |`name`|| |
| 8765 | The submit requirement name. |
| 8766 | |`description`|optional| |
| 8767 | Description of the submit requirement. |
| 8768 | |`applicability_expression`|optional| |
| 8769 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 8770 | change, the submit requirement is then applicable for this change. |
| 8771 | If not specified, the submit requirement is applicable for all changes. |
| 8772 | |`submittability_expression`|| |
| 8773 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 8774 | change, the submit requirement is fulfilled and not blocking change submission. |
| 8775 | |`override_expression`|optional| |
| 8776 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 8777 | change, the submit requirement is overridden and not blocking change submission. |
| 8778 | |`allow_override_in_child_projects`|optional| |
| 8779 | Whether this submit requirement can be overridden in child projects. Default is |
| 8780 | `true`. |
| 8781 | |=========================== |
| 8782 | |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8783 | [[submit-requirement-result-info]] |
| 8784 | === SubmitRequirementResultInfo |
| 8785 | The `SubmitRequirementResultInfo` describes the result of evaluating a |
| 8786 | submit requirement on a change. |
| 8787 | |
| 8788 | [options="header",cols="1,^1,5"] |
| 8789 | |=========================== |
| 8790 | |Field Name ||Description |
| 8791 | |`name`|| |
| 8792 | The submit requirement name. |
| 8793 | |`description`|optional| |
| 8794 | Description of the submit requirement. |
| 8795 | |`status`|| |
| 8796 | Status describing the result of evaluating the submit requirement. The status |
Youssef Elghareeb | f592ed1 | 2021-11-26 15:52:06 +0100 | [diff] [blame] | 8797 | is one of (`SATISFIED`, `UNSATISFIED`, `OVERRIDDEN`, `NOT_APPLICABLE`, `ERROR`, |
| 8798 | `FORCED`). |
Youssef Elghareeb | 024103e | 2021-09-06 14:41:04 +0200 | [diff] [blame] | 8799 | |`is_legacy`|| |
| 8800 | If true, this submit requirement result was created from a legacy |
| 8801 | link:#submit-record[SubmitRecord]. Otherwise, it was created by evaluating a |
| 8802 | submit requirement. |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8803 | |`applicability_expression_result`|optional| |
| 8804 | A link:#submit-requirement-expression-info[SubmitRequirementExpressionInfo] |
| 8805 | containing the result of evaluating the applicability expression. Not set if the |
| 8806 | submit requirement did not define an applicability expression. |
Youssef Elghareeb | 08d4cae | 2021-10-27 15:43:05 +0200 | [diff] [blame] | 8807 | Note that fields `expression`, `passing_atoms` and `failing_atoms` are always |
| 8808 | omitted for the `applicability_expression_result`. |
Youssef Elghareeb | df62c5a | 2022-04-08 12:23:23 +0200 | [diff] [blame] | 8809 | |`submittability_expression_result`|| |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8810 | A link:#submit-requirement-expression-info[SubmitRequirementExpressionInfo] |
Marija Savtchouk | 6d87bae | 2022-01-20 17:06:22 +0000 | [diff] [blame] | 8811 | containing the result of evaluating the submittability expression. + |
Youssef Elghareeb | df62c5a | 2022-04-08 12:23:23 +0200 | [diff] [blame] | 8812 | If the submit requirement does not apply, the `status` field of the result |
| 8813 | will be set to `NOT_EVALUATED`. |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8814 | |`override_expression_result`|optional| |
| 8815 | A link:#submit-requirement-expression-info[SubmitRequirementExpressionInfo] |
Marija Savtchouk | 6d87bae | 2022-01-20 17:06:22 +0000 | [diff] [blame] | 8816 | containing the result of evaluating the override expression. + |
Youssef Elghareeb | df62c5a | 2022-04-08 12:23:23 +0200 | [diff] [blame] | 8817 | Not set if the submit requirement did not define an override expression. If the |
| 8818 | submit requirement does not apply, the `status` field of the result will be set |
| 8819 | to `NOT_EVALUATED`. |
Youssef Elghareeb | 79f47362 | 2021-05-26 18:58:40 +0200 | [diff] [blame] | 8820 | |=========================== |
| 8821 | |
Jonathan Nieder | 2a629b0 | 2016-06-16 15:15:25 -0700 | [diff] [blame] | 8822 | [[submitted-together-info]] |
| 8823 | === SubmittedTogetherInfo |
| 8824 | The `SubmittedTogetherInfo` entity contains information about a |
| 8825 | collection of changes that would be submitted together. |
| 8826 | |
| 8827 | [options="header",cols="1,6"] |
| 8828 | |=========================== |
| 8829 | |Field Name |Description |
| 8830 | |`changes` | |
| 8831 | A list of ChangeInfo entities representing the changes to be submitted together. |
| 8832 | |`non_visible_changes`| |
| 8833 | The number of changes to be submitted together that the current user |
| 8834 | cannot see. (This count includes changes that are visible to the |
| 8835 | current user when their reason for being submitted together involves |
| 8836 | changes the user cannot see.) |
| 8837 | |=========================== |
| 8838 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 8839 | [[suggested-reviewer-info]] |
| 8840 | === SuggestedReviewerInfo |
| 8841 | The `SuggestedReviewerInfo` entity contains information about a reviewer |
| 8842 | that can be added to a change (an account or a group). |
| 8843 | |
| 8844 | `SuggestedReviewerInfo` has either the `account` field that contains |
| 8845 | the link:rest-api-accounts.html#account-info[AccountInfo] entity, or |
| 8846 | the `group` field that contains the |
| 8847 | link:rest-api-changes.html#group-base-info[GroupBaseInfo] entity. |
| 8848 | |
Logan Hanks | ab3c81e | 2016-07-20 15:42:52 -0700 | [diff] [blame] | 8849 | [options="header",cols="1,^1,5"] |
| 8850 | |=========================== |
| 8851 | |Field Name ||Description |
| 8852 | |`account` |optional| |
| 8853 | An link:rest-api-accounts.html#account-info[AccountInfo] entity, if the |
| 8854 | suggestion is an account. |
| 8855 | |`group` |optional| |
| 8856 | A link:rest-api-changes.html#group-base-info[GroupBaseInfo] entity, if the |
| 8857 | suggestion is a group. |
| 8858 | |`count` || |
| 8859 | The total number of accounts in the suggestion. This is `1` if `account` is |
| 8860 | present. If `group` is present, the total number of accounts that are |
| 8861 | members of the group is returned (this count includes members of nested |
| 8862 | groups). |
| 8863 | |`confirm` |optional| |
| 8864 | True if `group` is present and `count` is above the threshold where the |
| 8865 | `confirmed` flag must be passed to add the group as a reviewer. |
| 8866 | |=========================== |
| 8867 | |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 8868 | [[topic-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8869 | === TopicInput |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 8870 | The `TopicInput` entity contains information for setting a topic. |
| 8871 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 8872 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 8873 | |=========================== |
| 8874 | |Field Name ||Description |
| 8875 | |`topic` |optional|The topic. + |
| 8876 | The topic will be deleted if not set. |
Gal Paikin | 44dbd7e | 2020-04-15 15:23:44 +0200 | [diff] [blame] | 8877 | Topic can't contain quotation marks. |
Edwin Kempin | 64006bb | 2013-02-22 08:17:04 +0100 | [diff] [blame] | 8878 | |=========================== |
| 8879 | |
Makson Lee | 3568a93 | 2017-08-28 17:12:03 +0800 | [diff] [blame] | 8880 | [[tracking-id-info]] |
| 8881 | === TrackingIdInfo |
| 8882 | The `TrackingIdInfo` entity describes a reference to an external tracking system. |
| 8883 | |
| 8884 | [options="header",cols="1,6"] |
| 8885 | |====================== |
| 8886 | |Field Name|Description |
| 8887 | |`system` |The name of the external tracking system. |
| 8888 | |`id` |The tracking id. |
| 8889 | |====================== |
| 8890 | |
Oleg Aravin | bf313bb | 2016-10-24 12:28:56 -0700 | [diff] [blame] | 8891 | [[voting-range-info]] |
| 8892 | === VotingRangeInfo |
| 8893 | The `VotingRangeInfo` entity describes the continuous voting range from min |
| 8894 | to max values. |
| 8895 | |
| 8896 | [options="header",cols="1,6"] |
| 8897 | |====================== |
| 8898 | |Field Name|Description |
| 8899 | |`min` |The minimum voting value. |
| 8900 | |`max` |The maximum voting value. |
| 8901 | |====================== |
| 8902 | |
Edwin Kempin | bd885ff | 2014-04-11 16:11:56 +0200 | [diff] [blame] | 8903 | [[web-link-info]] |
| 8904 | === WebLinkInfo |
| 8905 | The `WebLinkInfo` entity describes a link to an external site. |
| 8906 | |
Edwin Kempin | af35ce4 | 2021-01-29 13:50:04 +0100 | [diff] [blame] | 8907 | [options="header",cols="1,^1,5"] |
| 8908 | |======================== |
| 8909 | |Field Name ||Description |
| 8910 | |`name` ||The link name. |
| 8911 | |`url` ||The link URL. |
| 8912 | |`image_url`|optional|URL to the icon of the link. |
| 8913 | |`target` |optional|The target window in which the web link should be opened. |
| 8914 | |======================== |
Edwin Kempin | bd885ff | 2014-04-11 16:11:56 +0200 | [diff] [blame] | 8915 | |
Alan Tokaev | 392cfca | 2017-04-28 11:11:31 +0200 | [diff] [blame] | 8916 | [[work-in-progress-input]] |
| 8917 | === WorkInProgressInput |
| 8918 | The `WorkInProgressInput` entity contains additional information for a change |
| 8919 | set to WorkInProgress/ReadyForReview. |
| 8920 | |
| 8921 | [options="header",cols="1,^1,5"] |
| 8922 | |============================= |
| 8923 | |Field Name ||Description |
| 8924 | |`message` |optional| |
| 8925 | Message to be added as a review comment to the change being set WorkInProgress/ReadyForReview. |
| 8926 | |============================= |
| 8927 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 8928 | GERRIT |
| 8929 | ------ |
| 8930 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 8931 | |
| 8932 | SEARCHBOX |
| 8933 | --------- |