gerrit/Documentation/config-robot-comments.txt
Edwin Kempin 3fde7e4e75 Add support for Robot Comments
Extend the PostReview REST endpoint to support posting of robot
comments. For this ReviewInput got a new field that can contain a list
of robot comments. For reading robot comments new REST endpoints have
been added.

Robot comments are only supported with NoteDb, but not with ReviewDb.

Robot comments are always stored as JSON, even if notedb.writeJson is
set to false.

In NoteDb robot comments are not stored in the change meta ref but in
a separate refs/changes/XX/YYYY/robot-comments ref. By storing robot
comments in a separate ref we can delete robot comments without
rewriting the history of the change meta branch which is needed for
auditing and hence cannot be rewritten. Deletion of robot comments is
not implemented in this change, but we may want to support this later
as the amount and size of robot comments can be large.

Draft robot comments are not supported, but robot comments are always
published comments.

Change-Id: I2d8a5ca59e9a8b2c34863c54a3a9576599f69526
Signed-off-by: Edwin Kempin <ekempin@google.com>
2016-09-28 15:34:54 +02:00

50 lines
1.8 KiB
Plaintext

= Gerrit Code Review - Robot Comments
Gerrit has special support for inline comments that are generated by
automated third-party systems, so called "robot comments". For example
robot comments can be used to represent the results of code analyzers.
In contrast to regular inline comments which are free-text comments,
robot comments are more structured and can contain additional data,
such as a robot ID, a robot run ID and a URL, see
link:rest-api-changes.html#robot-comment-info[RobotCommentInfo] for
details.
It is planned to visualize robot comments differently in the web UI so
that they can be easily distinguished from human comments. Users should
also be able to use filtering on robot comments, so that only part of
the robot comments or no robot comments are shown. In addition it is
planned that robot comments can contain fixes, that users can apply by
a single click.
== REST endpoints
* Posting robot comments is done by the
link:rest-api-changes.html[Set Review] REST endpoint. The
link:rest-api-changes.html#review-input[input] for this REST endpoint
can contain robot comments in its `robot_comments` field.
* link:rest-api-changes.html#list-robot-comments[List Robot Comments]
* link:rest-api-changes.html#get-robot-comment[Get Robot Comment]
== Storage
Robot comments are stored per change in a
`refs/changes/XX/YYYY/robot-comments` ref, where `XX/YYYY` is the
sharded change ID.
Robot comments can be dropped by deleting this ref.
== Limitations
* Robot comments are only supported with NoteDb, but not with ReviewDb.
* Robot comments are not displayed in the web UI yet.
* There is no support for draft robot comments, but robot comments are
always published and visible to everyone who can see the change.
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------