Skip to main content

Reviewing with GH Suggestions

When giving comments on GitHub, rather than commenting directly, reviewers can use the Add Suggestion option to improve the efficiency.

Reviewers

  1. Find the line(s) you want to comment on and click the + button.
  2. Click the Add a Suggestion button, and modify the content as needed. You can rewrite, delete, or add anything you need.
  3. Click Start a review. If you only need to give one single suggestion, instead of clicking Start a review, you can click Add a single comment and finish your review.
  4. Repeat steps 1-3 to add more comments.
  5. When you finish the review, click Finish your review in the upper right corner.
  6. (Optional) Write a comment to summarize your suggestions, and then click Comment.

PR owners

  • To accept one single suggestion:

    Click Commit suggestion below that suggestion. You can also add some description about the changes as needed. In this way, the suggestion will be applied and a new commit will be generated.

  • To accept more than one suggestions and apply them in a single commit:

    1. Find the suggestions you want to accept and click Add suggestion to batch below each suggestion.
    2. When you finish adding the suggestions to batch, click Apply suggestions.