Add Suggestions in a GitHub PR Review

Joe Previte
InstructorJoe Previte
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 3 years ago

Learn how to add suggestions in a PR review. In the files changed view on GitHub, select the line you want to make a suggestion like you would a regular comment. Right above the text box, simply click the first button that says Insert a suggestion. On the main page, it shows the suggested change and even has a way for the author to merge the change.

This is a way to give specific feedback that allows the author to commit your changes with the click of a button from the browser.

Instructor: [0:00] On the pull request page, head over to File is Changed. From here, scroll down and click the blue button on the line that you would like to make a suggestion. In this case, we'll do it on line seven. From here, select the first button which says Insert a Suggestion.

[0:15] This will add a code fence for the suggestion. From here, you can make the changes. For example, we're going to suggest removing the word "also" and changing this word to "some." Now what we can do is either hit Add Single Comment or Start a Review.

[0:32] We'll do that and finish. Take a look. As you can see from the main page, it shows the suggested change for the author and even provides a way for the author to commit the suggestion straight from the browser.

[0:45] If we go back and look at the File is Changed, you'll notice that our change has now been committed. That's it. That's how you add suggestions in a PR review on GitHub.