Skip to content

Fetch eligible approvers in DocumentationCodeOwner

What does this MR do and why?

This MR changes the behavior of AutomatedReviewRequestDoc to pick a random TW reviewer based on eligible approvers (that ultimately come from the CODEOWNERS file).

Before this MR:

  • if the CODEOWNERS would include users, we would not ping them (i.e. wrap their usernames in backticks), but assign them as reviewers
  • if the CODEOWNERS would include a group, we would ping the group, but not assign it

This behavior was inconsistent, and could lead to a bystander effect, or just plain noise.

The first commit of this MR changes the DocumentationCodeOwner class to return all TW eligible approvers, i.e. if a group is listed as approver, then eligible approvers would include all members of the group.

That means, we DocumentationCodeOwner#approvers now returns an array of usernames everytime. This is easier to reason about.

Then the second commit actually picks a random TW eligible approver from this array, and assign them for review.

That also means, we removed the specific behavior for when a group is listed as code owner.

Expected impact & dry-runs

Less noise for Technical Writers, and reduction of bystander effect as a result.

Action items

  • (If applicable) Add documentation to the handbook pages for Triage Operations =>
  • (If applicable) Identify the affected groups and how to communicate to them:
    • /cc @person_or_group =>
    • Relevant Slack channels =>
    • Engineering week-in-review

Closes #1079 (closed).

Edited by Rémy Coutable

Merge request reports