Code review with Upsource
Upsource makes it easy for you and your team to review code, discuss changes, and keep track of accumulated knowledge.
A code review in Upsource can be associated with one or more revisions, or an entire branch. Once initiated, a code review becomes a separate entity with a unique ID, allowing you and your team members to exchange comments over specific lines of code or discuss changes in general.
However, why would you review code at all?
Why review code?
There can be many reasons for you to start a code review, and here are just a few of them:
You have committed a change and now you want your fellow teammate to examine it and help you make sure that the new code is clear, readable and doesn't contain any serious flaws.
You have stumbled upon a potential problem in your teammate's change and you want to draw their attention to it.
You want to keep some of your teammates updated of your project status whenever an important change is made.
New teammates learn about different parts of the project faster.
Promote collective code ownership.
Post-commit review
Upsource supports post-commit reviews, which means you should commit a change to your VCS repository before a review can be initiated.
If your organization requires that code is reviewed before it gets merged into the master branch (trunk), you can commit to your feature branch and request review of this commit.
As soon as code review of this commit is successfully passed, you can then merge your changes to the master branch.
Roles in code review
In Upsource, a typical code review process involves two or more participants which can be divided into the following roles:
Author is a committer who usually initiates (creates) a review for his/her revision and invites other participants—reviewers and watchers—to examine and watch the changes he has committed.
The commit author is always considered the author of the review, no matter who actually creates the review. Upsource allows any user (with proper rights) to create a review. Besides, a review can be created automatically by Upsource in the course of a custom workflow set up by an administrator.
A review can include different revisions, made by different committers. In this case these committers become review authors as well.
See Requesting a Code Review for an author's workflow.
Reviewer is expected to examine the changes committed by Author and leave feedback. He can discuss specific lines, or add general comments; he can also complete the review, accepting the changes or raising concern about them. See Reviewing a Teammate's Changes for a reviewer's workflow.
Watcher is not expected to take part in the review process. He is just kept updated of the project's status whenever an important change is made. See Monitoring Changes Introduced by Teammates for a watcher's workflow.