mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #57] [MERGED] feat(assign-reviewers): skip auto-assign when the PR already has a non-author assignee (BE-4008) #66
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/57
Author: @mattmillerai
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-4008-skip-if-non-author-assignee📝 Commits (2)
de1e7ccfeat(assign-reviewers): skip auto-assign when a non-author assignee is already set (BE-4008)d474425fix(assign-reviewers): skip on unreadable live state + re-check before assigning (BE-4008)📊 Changes
1 file changed (+51 additions, -2 deletions)
View changed files
📝
.github/workflows/assign-reviewers.yml(+51 -2)📄 Description
ELI-5
When you open a PR, a bot normally picks reviewers for you and puts them in the
Assignee field (this org alerts people via assignees). But if you already
picked someone yourself — say you assigned a specific reviewer when you created
the PR — the bot was rudely piling its own picks on top of yours. This change
teaches the bot to look before it leaps: if a real person (anyone other than you,
the author) is already assigned, the bot leaves your choice alone and adds
nothing. If no one is assigned yet — or only you are assigned — the bot still
does its normal expertise-based pick.
What & why
assign-reviewers.ymlskipped only whenpr.assigneesfrom the triggerpayload was non-empty. Two problems, both fixed here:
in the
openedevent payload, so the old check missed it and the bot stackedits picks on top of an already-assigned PR (observed on a real cloud PR — the
auto-assigner added 2 assignees to a PR that already had one). Now the check
reads the PR's current assignees live from the API (
pulls.get), so acreation-time assignee is honored.
any assignee, including the author. Now only a non-author assignee causes
a skip; a PR assigned only to its author (e.g. by
assign-prs-to-author.yml)still gets the blame-based auto-pick.
Acceptance criteria
assignment (early
returnbefore the assign step).blame-based auto-assign (author is filtered out of the check).
github.rest.pulls.get),honoring an assignee set at PR creation.
Notes / judgment calls
#41). This ticket, filed the next day, explicitly asks for the non-author +
live-read behavior, so the change to that check is intended, not an accidental
broadening.
remain intentional for load-spread. The existing
skip-auto-assignlabelopt-out is untouched; this adds the automatic behavior alongside it.
payload assignees on API error, still applying the non-author filter — it never
fails the PR (consistent with the workflow's existing "never fail the PR" exits).
overriding a human's manual assignment; contributors keep full ability to
assign anyone. (Not a capability-denial change — nothing to falsify.)
Testing
python3YAML parse of the workflow +node --checkon the extractedgithub-scriptbody — both pass.github-scriptJS (per AGENTS.mdonly the Python/shell/Go helper scripts are tested); no such test was added, in
keeping with the repo's structure. The change is a ~21-line, self-contained
early-exit guard.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.