Code review is the process of reviewing and approving code changes for collaborators, someone other than the author of the pushed changes. It's basically code inspections conducted by peers working on the same project with a protected master branch. For more details on the code review process and benefits check out my post here.
When a notification has been received to review changes, go into GitHub and access the project repository.
Pull requests tab.
- A number next the
Pull requeststab indicates the number of requests pending review.
Pull requests from the listed items.
Pull requests has been selected a new page will display several details:
- Number of commits to be merged
- Number of files changed
- Contributors branch name
Before continuing in GitHub, make note of the contributors
branch name and return to the terminal. Once inside the projects root directory:
git fetch origin <branch name>
git checkout <branch name>
From here, run the application to identify any potential issues.
Go back to GitHub to review the code changes in the pull request.
- Select the
Commitstab or the
- This tab displays the history of the commits submitted for the specified pull request
commitcan be selected to review the progression of changes made
Files changed tab
This tab provides a side by side comparison of the file changes.
Newchanges are on the right-hand side highlighted in
- On the left-hand side,
oldchanges are highlighted in
The next step of the process will be to complete the pull request review. That process will provide the opportunity to make comments, approve the reviewed changes or request changes to be made before it can be approved. Therefore, if any issues were identified when the application was checked out and run locally be sure to make notes of the specific issues identified. If there is something noticeable when looking at the side by side view in the
Files changed tab also be sure to mention specifics in the next step of the process Complete and Merge a Pull Request.
For the completed Reference Guide Series:
- Part One: Reference Guide: Common Commands for Terminal.
- Part two: Create a GitHub Repository
- Part three: Committing Changes
- Part four: Committing Changes with Branches -Part five: Merge Conflicts
- Part six: Pull Requests
- Part seven: Conducting a Code Review -Part eight: Complete and Merge a Pull Request
Level up every day