Phabricator/ReviewerRotation
Phabricator Reviewer Rotation
In order to facilitate spreading code review responsibility more equally across a development team, we added additional functionality to our existing tool that synchronizes changes between Bugzilla and Phabricator called Phabbugz. Phabbugz already updates all new revisions when they are first created so updating reviewers based on certain criteria was possible. Herald, the rules engine in Phabricator, will update the revision first by adding a reviewer group based on rule matching such as file paths, etc. for the current code change. After, Phabbugz queries Phabricator to get the list of members of the reviewer group and assigns the next eligible person to review the revision based on their availability and their review load. Bugzilla already has user linkage to Phabricator so it maintains a record of the last user chosen. If the user has marked themselves unavailable for reviews or cannot see the revision due to security concerns, they will not be selected.
Setting up a reviewer rotation group:
- A bug is filed in Bugzilla in the Conduit product requesting that a new reviewer rotation group should be added and the initial members of the group. A Herald rule an also be requested to automatically add the rotation group to certain new revisions that match the criteria.
- A new reviewer rotation group is created in Phabricator and named such it ends in -rotation. Example: toolkit-telemetry-reviewers-rotation. The -reviewers-rotation part lets PhabBugz determine which groups to manage.
- Herald rules will be set up to add the reviewer rotation group automatically when new revisions are created. Normally the Herald rule will look at file paths, etc. to determine when to add the group.
- When the revision is created, Bugzilla will see it and check for a reviewer rotation group. If it find one, it queries Phabricator for the members and then based on who was last chosen, it will select the next user in the rotation.
- The selected user is added as a reviewer, and the rotation group is removed from the revision.
- Any users who do not want to be considered for review of a new revision, such as going on PTO, will need to going forward set their available for review status in Bugzilla general preferences.
Frequently Asked Questions
What if I temporarily do not want to be selected such as when I am on PTO?
You can go to your preferences settings for your Bugzilla account and set it to block review requests. When you return, then just turn blocking off.