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
- Find the line(s) you want to comment on and click the + button.
- Click the Add a Suggestion button, and modify the content as needed. You can rewrite, delete, or add anything you need.
- 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.
- Repeat steps 1-3 to add more comments.
- When you finish the review, click Finish your review in the upper right corner.
- (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:
- Find the suggestions you want to accept and click Add suggestion to batch below each suggestion.
- When you finish adding the suggestions to batch, click Apply suggestions.