Code reviews add a layer of accountability for scrupulous teams and work similarly to pull requests for GitHub. When team code reviews are enabled, any new snippets are subject to review and approval by another member of the team. In addition, if snippet update reviews are enabled, updates will also be subject to review and approval by another member.
A typical workflow for creating a new team snippet with code reviews enabled:
- Joe creates a new draft snippet and assigns it to Mary.
- Mary reviews the draft and asks for code changes via comments.
- Joe reviews Mary's comments and makes the necessary changes.
- Mary approves the draft, which then becomes a snippet in the team library.
Enabling team code reviews
When creating a team
You will be asked whether to enable code reviews as step 3 of the process of starting a team.
For an existing team
Click on the gear icon next to the team title in the sidebar to open up the team settings. Select Code Reviews in the navigation menu to enable/disable code reviews.
Code review UI
New/edit snippet dialog
With code reviews enabled, the new/edit snippet dialog will have a control in the footer to assign the snippet draft to another team member. (only appears for teams with >1 member, see note below)
Code review navigation items
Once the draft snippet has been created, it will appear as an item in the sidebar under My Drafts. The navigation items work as follows:
- All Drafts (manager/owner only) - See the full list of draft snippets under review for the team. A team owner or manager can comment on drafts but may not approve them, unless she is also assigned to review a specific draft.
- My Drafts (all members) - New drafts or updates created by you. You have the ability to comment, but not approve these.
- Needs My Review - Drafts which are assigned to you. You have the ability to comment or approve these drafts.
Draft snippet controls
If you are assigned to review a draft snippet, you have the option to comment or approve the code. You will see the these controls in the snippet view's header.
- A team with a single member (the owner) will not have his snippets reviewed, even with code reviews enabled.
Please sign in to leave a comment.