Link Search Menu Expand Document

Adding Comments to Pull Request on GitHub

Since you created the pull request, you will be notified when someone adds a comment or a review. Sometimes, the reviewer will ask you to make a change to the file you just created. Let’s see how GitHub makes this easy.

discuss code

Adding line comments to a pull request

  1. Under your repository name, click Pull requests.
  2. In the list of pull requests, click the pull request where you’d like to leave line comments.
  3. On the pull request, click +/- Files changed.
  4. Hover over the line of code where you’d like to add a comment, and click the blue comment icon. To add a comment on multiple lines, click and drag to select the range of lines, then click the blue comment icon.Blue comment icon
  5. In the comment field, type your comment.

    Optionally, to suggest a specific change to the line or lines, click +/- , then edit the text within the suggestion block.

When you’re done, click Add single comment.

Anyone watching the pull request or repository will receive a notification of your comment.

discuss code

Editing a File on GitHub

To edit a pull request file, you will need to access the Files changed tab.

  1. Click ![octicon-kebab-horizontal] in the top right corner of the diff.
  2. Click Edit file to edit the file using the GitHub file editor.
  3. Make changes to the file based on the comments from your reviewer or your personal perspective.