Skip to content

Reviewers bot can request non-gravitational reviewers on backports #410

@fheinecke

Description

@fheinecke

When the reviewers bot looks at a backport PR for reviewers, it will attempt to request all reviewers assigned to the PR, even if they are not members of the gravitaitonal GitHub org. This can happen when the source PR for a backport has reviewers that are no longer with the company.

The bot needs to check collaborator status before attempting to assign reviewers.

Example:

  • PR - updating reference to teleport.e latest master branch to pick up #7447 teleport#60483

  • Workflow run - https://github.com/gravitational/teleport/actions/runs/18728697384/job/53420450515

  • Truncated, redacted log

    2025-10-22T20:22:39.8116094Z 2025/10/22 20:22:39 Reviewers loaded with 20 cloud and 47 core reviewers
    2025-10-22T20:22:39.8116948Z 2025/10/22 20:22:39 Running assign.
    # Note that these are from the OSS repo #7447 PR, not the enterprise repo #7447 PR
    2025-10-22T20:22:40.7820517Z 2025/10/22 20:22:40 Assign: Found original PR #7447.
    # Three of these reviewers are no longer with the company at the time of writing
    2025-10-22T20:22:41.2699102Z 2025/10/22 20:22:41 Assign: Requesting reviews from: [klizhentas r0mant quinqu wadells awly russjones].
    2025-10-22T20:22:41.5645743Z 2025/10/22 20:22:41 Workflow assign failed: POST https://api.github.com/repos/gravitational/teleport/pulls/60483/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the gravitational/teleport repository. [].
    2025-10-22T20:22:41.5653596Z exit status 1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions