Reviewing pull requests
When a pull request is created, it’s important to review the changes carefully. This process helps ensure that the code meets the project’s standards and doesn’t introduce any new issues. During the review, you can discuss the changes with the author, suggest improvements, and request additional commits if necessary.
We will practice this by reviewing the pull request you have just made in creating pull requests.
GitHub Website
Go back to the git-academy-sandbox repository overview page on GitHub, as if you have just come to find the pull request your colleague has asked you to review.
Navigate to the ‘Pull requests’ tab.
Click on the pull request you want to review, in this case the one you created above.
- Review the changes by looking at the “Files changed” tab. You can see a side-by-side comparison of the changes made. Add comments by clicking the “+” icon next to the lines of code you want to comment on.
When reviewing pull requests, you may also wish to view changes locally to check the code runs and view any outputs.You can do this by pulling and changing to the branch that is being requested to be merged in.
Once you have reviewed the changes, you can leave general feedback, approve or request changes by clicking the ‘review changes’ button.
- Once you are happy with the changes, you should approve the pull request. The person who created the request will then get an email letting them know their changes have been approved. It can also be helpful to send them a direct message to let them know you have reviewed their PR! They can then go back and complete the request.