0d Code review in GitHub - ftsrg-edu/swsv-labs GitHub Wiki

Code review in GitHub

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].

  1. [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).
  2. [DEV] Invite the person you are working with as a collaborator to your repository.
  3. [DEV] Create a new branch called fix.
  4. [DEV] Fix a small bug found by one of the static analysis tools, then commit and push your changes.
  5. [DEV] Open a pull request with the new commit, and assign it to the other person.
  6. [REV] Inspect the pull request of the other person.
  7. [REV] Go to the Files changed tab and Start a review.
  8. [REV] Add comments to specific source lines identifying problems or suggesting changes.
  9. [REV] After adding the comments you can submit your review with the button in the top right corner and select Reqest changes.
  10. [DEV] Make changes according to the review and add a new commit to the ongoing pull request.
  11. [REV] If the commit solves the problem, then Approve the review.
  12. [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.