Skip to content
Cody Mingus edited this page Mar 26, 2014 · 8 revisions

The purpose of this wiki page is to explain what you should do as a code reviewer.

Step 1: Get the latest from GitHub

Use git fetch origin to download all of the latest branches from GitHub.

Step 2: Switch branches

Switch to the branch that is currently under review. If the branch under review was called 123NewFeature, then you could switch to that branch with git checkout -b 123NewFeature origin/123NewFeature.

  • The git checkout part means you want to switch to a different branch.
  • git checkout -b means you want to switch to a branch that doesn't exist yet, so git needs to make it.
  • git checkout -b 123NewFeature means that you want to switch to a new branch called 123NewFeature based on the branch you are currently in (so the new branch will look just like the one you were just in).
  • git checkout -b 123NewFeature origin/123NewFeature means switch to a branch called 123NewFeature based on the branch called 123NewFeature that exists in the remote repository (GitHub). origin basically means GitHub.

Step 3: Make sure the required changes were made

The build script can ensure that the code is good code, but it can't make sure that everything that was supposed to happen in the feature did actually happen. So look at the changes to the view (If GUI changes) and the changes on GitHub (In changes tab at the top of the pull request) and ensure that everything is accounted for. If something is missing/wrong, leave a comment on the pull request.

Step 4: Look for smelly code

Do a quick sweep through the changes on GitHub and look for any code that looks like it should be refactored (like lots of repeated code, methods that are too long and should be broken into smaller ones, etc). If you find something that looks like it should be refactored, leave a comment in the pull request about it.

Step 5: Run the build script

Make sure that the build script passes on your computer. If it doesn't, complain to the person who wrote the code. To run the build script run the command ant from the root directory of the project (the folder named AutoAutoTest).

Step 6: Merge

Once the other person has fixed all violations (or explained why there wasn't an issue), go ahead and merge the code using the merge button at the bottom of the pull request. GitHub should then give you an option to delete the branch. Go ahead and do so.

Step 7: Complete the task

Finally, mark the task as completed in Rally.

Clone this wiki locally