Forward the reviewers a dispatcher names onto the PR it opens - #91
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 /tasksaccepts an optionalreviewerslist 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
assign-reviewers.ymllistens forready_for_review) rather than racing it.existing_prfollow-up pushes onto a branch whose review is already requested, and re-requesting resets a review the author may already have given.request_reviewerslogs and swallows everything (including transport errors) and returns the logins it actually requested. Tested.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 formatclean.🤖 Generated with Claude Code