Add an Inline Comment to a File
When a code review is in progress, you can add inline comments directly to the lines of code in a file. You can’t, however, add an inline comment after a merge request has been merged or closed.
Here's how to add inline comments directly to the source code being reviewed:
Click the Pending Comments tab to see your pending or unpublished comments.
To reply to a published comment, click Reply
, enter your comment, and click Reply. Replies to
published comments will be published immediately but you can only edited or deleted
them if you added them. In addition, you can't edit or delete comments added by
other users. You can only reply to those.
To filter published comments, select Filter and enter a term or partial string to filter by.
To edit one of your comments, select the comment and then click
Edit
. Make your changes and then click Save to post your
edited comment.
Manage Unpublished Comments
The Pending Comments tab displays all pending comments with the code where these comments were added. The comments appear inline in the code.
Here are several things you can do with unpublished comments:
-
To edit a comment, click Edit
.
-
To publish a pending comment, click Publish to the right side of the comment header.
-
To publish all pending comments, click Publish All.
-
To discard all pending comments, click Discard All.
-
To delete a comment, click Delete
.