How to review a PR ?
Reviews allow collaborators to comment on the changes proposed in pull requests, approve the changes, or request further changes before the pull request is merged. Repository administrators or maintainers can require that all pull requests are approved before being merged.
Note : You need not to be a maintainer or a project admin to to review a PR 🚀.​
Starting a Review
🔘 Go to the main page of the repository and then click on Pull Requests
.
🔘 In the Pull Request page click on the Pull Request that you want to review.
🔘 After selecting the Pull Request, click on Files changed
.
🔘 Now you will see a new page containing all the changed code, Now hover over the line of code where you want to add a comment and then click on the blue ➕ icon.
🔘 To add a comment on multiple lines, click and drag to select the range of lines, then click on the blue ➕ icon.
🔘 Now comment your views or add screenshots in the comment box
.
🔘 In case you want to directly suggest some specific change in the code, click on the button which is highlighted in the yellow box shown in the demo given below and then edit the text within the suggestion block
.
🔘 After commenting, click on Start a review
.
🔘 You can add as many comments as you want to different lines of code, and to do so follow the same process and click on Add review comment
.
🔘 You can also edit or delete you comments anytime during a review.
Marking a file as viewed
After you finish reviewing a file, you can mark the file as viewed, and the file will collapse. If you again make some changes in the file, it will be unmarked as viewed.
🔘 On the right of the header of the file you've finished reviewing, select Viewed.
Submitting your review
Once you are done with reviewing all the files in a Pull Request, you have to submit your review.
🔘 On the top right corner of the Files changed
page click on Review changes
/Finish your review
.
🔘 Now type a final comment as a summary of your feedback to the proposed changes.
🔘 Now select the type of review you want to leave.
There are three types of review that you can submit.​
• Comment
: To leave general feedback without explicitly approving the changes or requesting additional changes.
• Approve
: To submit your feedback and approve merging the changes proposed in the pull request.
• Request changes
: To submit feedback that must be addressed before the pull request can be merged.
🔘 After selecting the type of review, click on Submit review
.