About the code review process
As authors and reviewers perform tasks, files move through the code review process and the review status changes. See Understanding code review status.
The following flowchart illustrates the built-in code review workflow, which uses triggers to automatically email users when reviews are started and completed.
Common tasks
Following are details about code review tasks that move files through the review workflow.
1. Create a code review to group files that need review
Authors are responsible for submitting changes for review and incorporating review feedback. Authors typically create their own code reviews. For example, you may want to create a code review before making changes so it is available as you work with the files, or you may want to wait to create the code review until you are ready to check in multiple related files that need review.
Administrators or team leads may want to create code reviews for other users. For example, at the beginning of a release, the team lead may want to create a review for each new feature and select the authors and reviewers before files are updated.
2. Add files to the review
New code reviews have a Work in Progress status. You can add files to reviews when adding and checking in files to Surround SCM. You can also add files to reviews from the Code Review and Source Tree windows and when viewing file history, promoting or rebasing files, or analyzing risk of files attached to issues. See Adding files to code reviews.
3. Start the review
When all files needing review are added to the code review, start it to indicate it is ready for review and automatically email the reviewers. See Starting code reviews. The code review status changes to Awaiting Review.
4. Reviewers review files and add comments
Reviewers open the code review and add comments for authors to address. See Reviewing files in code reviews. When they finish reviewing individual files, they mark them as completed in the code review. The authors are notified that the code review is complete after all reviewers complete their reviews.
5. Authors address review comments
Files with unaddressed review comments have a Needs Attention status. Authors make the necessary changes to these files, replace the file in the code review with the updated version, and then mark the comments as addressed. See Addressing code review comments.
6. Repeat the review until all files are approved
After all the review comments are addressed, restart the review. The review process may repeat multiple times. Reviews are approved when all reviewers approve all files in them.