JetBrains Space Help

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:

  1. On the Review page, go to Timeline (it's the default view).

  2. 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.

    postReviewComment.png

    Your comment will be displayed in the Timeline feed.

  3. 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:

    reviewCommentOptions.png

To post a code selection comment:

  1. On the review page, go to the Changes tab.

  2. Select the commit (if more than one included) and the file to display its diff.

  3. In the diff, select the line you want to comment by clicking the icon to the left:

    postLineComment.png

    To select multiple lines, drag your cursor up or down:

    postSelectionComment.png
  4. 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.

  5. postedSelectionComment.png
    • 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):

    authorUpdateReview.png
  • If you are reviewer, click Submit drafts (or Accept changes if you're ready to approve):

    reviewerCommentsWait.png

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

  1. Select the line or a fragment of code you'd like to edit:

    suggestedEdits1.png
  2. Click Suggest changes and edit it:

    suggestedEdits2.png
  3. Comment your edits as well if you'd like to explain the reasoning behind them:

    suggestedEdits3.png
  4. When your teammate sees your edits, they can accept and commit them right away:

    suggestedEdits4.png

Last modified: 06 April 2023