Add Suggestions in a GitHub PR Review

Joe Previte
InstructorJoe Previte
Share this video with your friends

Social Share Links

Send Tweet
Published 4 years ago
Updated 2 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.

egghead
egghead
~ 8 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today