About code review assignments
By using code review assignments, any time your team has been requested to review a pull request, the team is removed as a reviewer and a specified subset of team members are assigned in the team's place. Code review assignments allow you to decide whether the whole team or just a subset of team members are notified when a team is requested for review.
When code owners are automatically requested for review, the team is still removed and replaced with individuals. The individual approvals don't satisfy the requirement for code owner approval in a protected branch. For more information, see "About code owners."
Routing algorithms
Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.
The round robin algorithm chooses reviewers based on who's received the least recent review request, focusing on alternating between all members of the team regardless of the number of outstanding reviews they currently have.
The load balance algorithm chooses reviewers based on each member's total number of recent review requests and considers the number of outstanding reviews for each member. The load balance algorithm tries to ensure that each team member reviews an equal number of pull requests in any 30 day period.
Configuring code review assignment
-
In the top right corner of GitHub Enterprise Server, click your profile photo, then click Your profile.
-
On the left side of your profile page, under "Organizations", click the icon for your organization.
-
Under your organization name, click Teams.
-
On the Teams tab, click the name of the team.
-
At the top of the team page, click Settings.
-
In the left sidebar, click Code review assignment
-
Select Enable auto assignment.
-
Under "How many team members should be assigned to review?", use the drop-down menu and choose a number of reviewers to be assigned to each pull request.
-
Under "Routing algorithm", use the drop-down menu and choose which algorithm you'd like to use. For more information, see "Routing algorithms."
-
Optionally, to always skip certain members of the team, select Never assign certain team members. Then, select one or more team members you'd like to always skip.
-
Optionally, to only notify the team members chosen by code review assignment for each pull review request, under "Notifications" select If assigning team members, don't notify the entire team.
-
Click Save changes.
Disabling code review assignment
-
In the top right corner of GitHub Enterprise Server, click your profile photo, then click Your profile.
-
On the left side of your profile page, under "Organizations", click the icon for your organization.
-
Under your organization name, click Teams.
-
On the Teams tab, click the name of the team.
-
At the top of the team page, click Settings.
-
Select Enable auto assignment to remove the checkmark.
-
Click Save changes.