Comments and Suggested Changes
All code review participants can discuss changes right within a review by posting comments and reply to the comments left by others.
When reviewing a Merge Request, you can also edit the code and post your edits as suggestions.
Comments posted on the review pages also appear in the participant's Chats in a dedicated channel. So, once a discussion is started, you can continue either from Chats or from the review — all comments and replies are synced.
Types of comments
There are two types of comments you can post:
Review comment is not tied up to any particular file or part of code — its subject matter may be anything within the scope of the review.
Code selection comment is intended to pinpoint and discuss a particular line or fragment of code in one of the files being reviewed. A code selection comment can be continued as a discussion which can be marked resolved when finished.
To post a review comment:
On the Review page, go to Timeline (it's the default view).
Enter your message in the text box and either post it now (press Control+Shift+P) or save (press Enter) to submit later with other comments.
Your comment will be displayed in the Timeline feed.
You can also:
Start a thread when replying to a comment.
Add a reaction (emoji) to a posted comment.
Copy a link to a comment (to show a comment to someone).
Add the comment to your To-Do list.
Create an issue out of the comment.
Edit or delete your comment.
Hover over the comment area and choose the desired action:
To post a code selection comment:
On the review page, go to the Changes tab.
Select the commit (if more than one included) and the file to display its diff.
In the diff, select the line you want to comment by clicking the icon to the left:
To select multiple lines, drag your cursor up or down:
Enter your message in the text box and either post it now (press Control+Shift+P) or save (press Enter) to submit later with other comments.
Your comment will be embedded in code and highlighted with yellow.
You can reply to comments left by others.
When a discussion comes to a logical end, it can be marked as resolved.
You can hide discussions to reduce noise when viewing the code.
Posting options
Any comment you write can be submitted right away — just click Post now or press Control+Shift+P. However, each time you post a comment, a notification is sent to the other party. If you don't want to disturb other participants before you are finished reviewing or revising, you can save your comments as drafts and submit them all at once when you're done.
To save your comment as a draft, just press Enter or click Save draft.
When you're ready to submit your saved comments, change your status to Waiting:
If you are author, click Submit drafts (or Finish if you believe your work is finished):
If you are reviewer, click Submit drafts (or Accept changes if you're ready to approve):
Your comments will be posted and the other party will be notified.
Suggest changes in a merge request
When reviewing a merge request, you can make quick edits to the code and post them as suggestions instead of just leaving comments.
To suggest edits
Select the line or a fragment of code you'd like to edit:
Click Suggest changes and edit it:
Comment your edits as well if you'd like to explain the reasoning behind them:
When your teammate sees your edits, they can accept and commit them right away: