Skip to content

Forward the reviewers a dispatcher names onto the PR it opens - #91

Merged
tarekziade merged 2 commits into
mainfrom
feat/request-reviewers-on-new-pr
Aug 18, 2026
Merged

Forward the reviewers a dispatcher names onto the PR it opens#91
tarekziade merged 2 commits into
mainfrom
feat/request-reviewers-on-new-pr

Conversation

@tarekziade

Copy link
Copy Markdown
Collaborator

Why

A dispatcher often knows who should look at a fix, and had no way to say so. The integration-failure triage is the case in point: when CI's bisect pins a regression to a commit, it knows that commit's author — but the fix PR opened with no review request, so the one person who knows what the change was meant to do had to notice by chance.

Pairs with huggingface/transformers-ci#81, which sends the author.

What

POST /tasks accepts an optional reviewers list of GitHub logins, and serge requests their review on the PR it opens. serge stays generic — it forwards the request and holds no opinion about who is relevant.

Details that matter

  • After the draft→ready transition, so it adds to whatever the repo's own routing does (transformers' assign-reviewers.yml listens for ready_for_review) rather than racing it.
  • New PRs only. An existing_pr follow-up pushes onto a branch whose review is already requested, and re-requesting resets a review the author may already have given.
  • Fail-soft. GitHub 422s the whole call for reasons that are none of the PR's business — the login isn't a collaborator, it's the PR's own author, it no longer exists. The PR is published by then, so request_reviewers logs and swallows everything (including transport errors) and returns the logins it actually requested. Tested.
  • Malformed entries are dropped, not raised — same contract as test_links: a review request is a courtesy on top of the fix and must never cost a PR. Logins are validated against GitHub's charset, which also drops bots (dependabot[bot]): a bot can't review, and one invalid login 422s the whole request, taking the valid ones with it. Deduped case-insensitively, @ stripped, capped at 10 (GitHub's own limit is 15).

663 tests pass, make format clean.

🤖 Generated with Claude Code

tarekziade and others added 2 commits August 18, 2026 13:52
A dispatcher often knows who should look at a fix and had no way to say
so. The integration-failure triage is the case in point: when CI's bisect
pins a regression to a commit it knows that commit's author, but the fix
PR opened with no reviewer request, so the one person who knows what the
change was meant to do had to notice it by chance.

Accept an optional `reviewers` list of GitHub logins on POST /tasks and
request their review after the PR goes draft->ready. serge stays generic:
it forwards the request and holds no opinion about who is relevant.

Details that matter:

- Requested AFTER the draft->ready transition, so it ADDS to whatever the
  repo's own routing (transformers' assign-reviewers.yml) does rather
  than racing it.
- New PRs only. An existing_pr follow-up pushes onto a branch whose
  review is already requested, and re-requesting resets a review the
  author may already have given.
- Fail-soft: GitHub 422s the whole call for reasons that are none of the
  PR's business (the login is not a collaborator, it is the PR's own
  author, it no longer exists). The PR is published by then, so
  request_reviewers logs and swallows everything, including transport
  errors, and returns the logins it actually requested.
- Malformed entries are dropped rather than raising, same contract as
  test_links: a review request is a courtesy on top of the fix and must
  never cost a PR. Logins are validated against GitHub's charset, which
  also drops bots (`dependabot[bot]`) — a bot cannot review, and one bad
  login 422s the whole request, taking the valid ones with it. Deduped
  case-insensitively and capped at 10 (GitHub's own limit is 15).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tarekziade
tarekziade merged commit 1abef1d into main Aug 18, 2026
3 checks passed
@tarekziade
tarekziade deleted the feat/request-reviewers-on-new-pr branch August 18, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant