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.
Adding line comments to a pull request
- Under your repository name, click Pull requests.
- In the list of pull requests, click the pull request where you’d like to leave line comments.
- On the pull request, click +/- Files changed.
- 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
- 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.
Editing a File on GitHub
To edit a pull request file, you will need to access the Files changed tab.
- Click ![octicon-kebab-horizontal] in the top right corner of the diff.
- Click Edit file to edit the file using the GitHub file editor.
- Make changes to the file based on the comments from your reviewer or your personal perspective.