# Automatic reviewer assignment for pull requests

> Nudge assigns every GitHub, Gitea or Forgejo pull request one accountable reviewer: a requested reviewer if there is one, otherwise the next person in a round-robin pool.

Nudge assigns every open pull request on GitHub, Gitea or Forgejo to one accountable reviewer, automatically, the moment it opens. When a pull request has one owner rather than a group request everyone assumes someone else will pick up, it gets reviewed.

## How the reviewer is picked

1.  **Requested reviewers come first.** If the author already requested reviewers on the pull request, Nudge makes one of them accountable, at random. Someone outside every reviewer pool still counts.
2.  **Otherwise the pool decides.** With nobody requested, the repository's reviewer pool picks the next person in a fair round-robin rotation, and Nudge requests their review on GitHub, Gitea or Forgejo too, so the host and Nudge agree on who the reviewer is.
3.  **Nobody is assigned their own pull request**, and bots and reviewers switched off in the pool are skipped.

If nobody can be found, because no pool covers the repository or nobody in it can review, Nudge says so and why, instead of leaving the pull request quietly unassigned.

## Reviewer pools

A pool is a group of reviewers and the repositories they cover, for example a platform team and its services. Rotation is per pool, so reviews are shared fairly within each team. Insights shows how the load is actually spread, person by person.

![A reviewer pool in the Nudge dashboard, with its repositories and members in rotation order](/screenshots/reviewer-pools-light.webp)![A reviewer pool in the Nudge dashboard, with its repositories and members in rotation order](/screenshots/reviewer-pools-dark.webp)

## After assignment

The reviewer is told straight away in Slack or Mattermost, then nudged on your schedule until they approve or request changes, or the pull request is merged or closed. If they don't respond after the set number of nudges, Nudge reassigns to the next person in the pool or tells your admins.

## Questions

How is this different from GitHub's team review assignment?

GitHub can route a team review request to members by round robin or load balance. Nudge also respects reviewers the author picked, works the same on Gitea and Forgejo, and keeps chasing the assigned reviewer, reassigning when they don't respond.

Does it work with CODEOWNERS?

Reviewers requested on the pull request, including ones GitHub requests from CODEOWNERS, are respected: one of them becomes the accountable reviewer.

Can I see who's carrying the review load?

Yes. Insights shows reviews assigned, passed on and pending per person and per pool, week by week.
