-
Notifications
You must be signed in to change notification settings - Fork 9
0d Code review in GitHub
Zoltan Micskei edited this page Sep 6, 2018
·
1 revision
GitHub offers a light-weight code review functionality as part of pull requests. Try the complete code review workflow on a simple example.
To make this smooth, you should work in pairs. If you are completing the exercises in a lab session, then work with the person next to you. If you are completing the exercises from home, then you could work with one of your team members from the home assignment. Each of you should complete these exercises, once as a developer making a fix [DEV], and once as a reviewer [REV].
- [DEV] Use the json-simple project from the static analysis exercise (or an other small Java project available as a public repository under your account).
- [DEV] Invite the person you are working with as a collaborator to your repository.
- [DEV] Create a new branch called
fix
. - [DEV] Fix a small bug found by one of the static analysis tools, then commit and push your changes.
- [DEV] Open a pull request with the new commit, and assign it to the other person.
- [REV] Inspect the pull request of the other person.
- [REV] Go to the Files changed tab and Start a review.
- [REV] Add comments to specific source lines identifying problems or suggesting changes.
- [REV] After adding the comments you can submit your review with the button in the top right corner and select Reqest changes.
- [DEV] Make changes according to the review and add a new commit to the ongoing pull request.
- [REV] If the commit solves the problem, then Approve the review.
- [DEV] Merge that pull request into the master branch.
CHECK: create a screenshot about the review part of the pull request.
For more information see Reviewing changes in pull requests.