Edwin Kempin | 3fde7e4 | 2016-09-19 15:35:10 +0200 | [diff] [blame] | 1 | = Gerrit Code Review - Robot Comments |
| 2 | |
| 3 | Gerrit has special support for inline comments that are generated by |
| 4 | automated third-party systems, so called "robot comments". For example |
| 5 | robot comments can be used to represent the results of code analyzers. |
| 6 | |
| 7 | In contrast to regular inline comments which are free-text comments, |
| 8 | robot comments are more structured and can contain additional data, |
| 9 | such as a robot ID, a robot run ID and a URL, see |
| 10 | link:rest-api-changes.html#robot-comment-info[RobotCommentInfo] for |
| 11 | details. |
| 12 | |
| 13 | It is planned to visualize robot comments differently in the web UI so |
| 14 | that they can be easily distinguished from human comments. Users should |
| 15 | also be able to use filtering on robot comments, so that only part of |
| 16 | the robot comments or no robot comments are shown. In addition it is |
| 17 | planned that robot comments can contain fixes, that users can apply by |
| 18 | a single click. |
| 19 | |
| 20 | == REST endpoints |
| 21 | |
| 22 | * Posting robot comments is done by the |
| 23 | link:rest-api-changes.html[Set Review] REST endpoint. The |
| 24 | link:rest-api-changes.html#review-input[input] for this REST endpoint |
| 25 | can contain robot comments in its `robot_comments` field. |
| 26 | * link:rest-api-changes.html#list-robot-comments[List Robot Comments] |
| 27 | * link:rest-api-changes.html#get-robot-comment[Get Robot Comment] |
| 28 | |
| 29 | == Storage |
| 30 | |
| 31 | Robot comments are stored per change in a |
| 32 | `refs/changes/XX/YYYY/robot-comments` ref, where `XX/YYYY` is the |
| 33 | sharded change ID. |
| 34 | |
| 35 | Robot comments can be dropped by deleting this ref. |
| 36 | |
| 37 | == Limitations |
| 38 | |
| 39 | * Robot comments are only supported with NoteDb, but not with ReviewDb. |
| 40 | * Robot comments are not displayed in the web UI yet. |
| 41 | * There is no support for draft robot comments, but robot comments are |
| 42 | always published and visible to everyone who can see the change. |
| 43 | |
| 44 | GERRIT |
| 45 | ------ |
| 46 | Part of link:index.html[Gerrit Code Review] |
| 47 | |
| 48 | SEARCHBOX |
| 49 | --------- |