我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们
文章版本: GitHub.com

Managing code review assignment for your team

Code review assignments clearly indicate which members of a team are expected to submit a review for a pull request.

代码审查任务可用于 GitHub Team 和 GitHub Enterprise Cloud。 更多信息请参阅“GitHub's products”。

本文内容

Team maintainers and organization owners can configure code review assignments.

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 alogrithms.

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

  1. 在 GitHub 的右上角,单击您的个人资料照片,然后单击 Your profile(您的个人资料)
    个人资料照片
  2. 在您的个人资料页面左侧的“Organizations(组织)”下,单击组织的图标。
    组织图标
  3. 在组织名称下,单击 Teams(团队)
    团队选项卡
  4. 在 Teams(团队)选项卡上,单击团队名称。
    组织的团队列表
  5. 在团队页面顶部,单击 Settings(设置)
    团队设置选项卡
  6. In the left sidebar, click Code review assignment
    Code review assignment button
  7. Select Enable auto assignment.
    Code review assignment button
  8. 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.
    Number of reviewers dropdown
  9. Under "Routing algorithm", use the drop-down menu and choose which algorithm you'd like to use. For more information, see "Routing algorithms."
    Routing algorithm dropdown
  10. 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.
    Never assign certain team members checkbox and dropdown
  11. 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.
    Code review assignment notifications
  12. 单击 Save changes(保存更改)

Disabling code review assignment

  1. 在 GitHub 的右上角,单击您的个人资料照片,然后单击 Your profile(您的个人资料)
    个人资料照片
  2. 在您的个人资料页面左侧的“Organizations(组织)”下,单击组织的图标。
    组织图标
  3. 在组织名称下,单击 Teams(团队)
    团队选项卡
  4. 在 Teams(团队)选项卡上,单击团队名称。
    组织的团队列表
  5. 在团队页面顶部,单击 Settings(设置)
    团队设置选项卡
  6. Select Enable auto assignment to remove the checkmark.
    Code review assignment button
  7. 单击 Save changes(保存更改)

问问别人

找不到要找的内容?

联系我们