mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #358] [MERGED] feat(cursor-review): per-author auto-approve opt-in (approve_authors) #359
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#359
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/358
Author: @mattmillerai
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-19479-cursor-review-approve-authors📝 Commits (3)
65a46ccfeat(cursor-review): per-author auto-approve opt-in (approve_authors)2b6117cfix(cursor-review): fail closed on approve_authors edge cases130836ddocs(cursor-review): document approve_authors withdrawal and fail-closed list (BE-19479)📊 Changes
5 files changed (+301 additions, -15 deletions)
View changed files
📝
.github/cursor-review/README.md(+1 -0)📝
.github/cursor-review/auto-approve.py(+45 -8)📝
.github/cursor-review/tests/test_auto_approve.py(+172 -1)📝
.github/workflows/cursor-review.yml(+71 -5)📝
docs/callers/cursor-review.md(+12 -1)📄 Description
ELI-5
Auto-approve in
cursor-review.ymlis currently all-or-nothing for a caller repo. This adds anapprove_authorslist, so a repo can turn auto-approve on for a few PR authors first. PRs by anyone else still get the full review and its threads, but the bot doesn't approve or request changes on them.What changed
approve_authors(string, default''): a comma- or space-separated list of GitHub logins. Matching ignores case and a leading@. An empty list means every author, which is today's behaviour.gatejob. A new first step writesapprove_author_ok(true/false).gateruns on every event, so the workflow-levelapprove_gateoutput reportsofffor an unlisted author whether or not a round runs. It doesn't fall back tountrustedon no-round events.decide(auto-approve.py) has new--author-enabled/--pr-authorflags. When the author isn't listed it writesapprove_gate=off, posts no APPROVE and no REQUEST_CHANGES, and emits the note "auto-approve not enabled for author<login>". An invalidapprove_max_severitystill fails red.post-review.pygets an empty approve threshold for an unlisted author. Without that, it would label threads "not blocking auto-approve" for a decision that is never taken.post-reviewnow listsgateinneeds:so it can read the output.gatealways runs and succeeds, so this adds no ordering and no skip path.docs/callers/cursor-review.md, theoffrow of theapprove_gatetable, and the knob table in.github/cursor-review/README.md.Judgment calls
decidefor an unlisted author. This matches what an emptyapprove_max_severitydoes:decidedoesn't run at all, and stale approvals are left to dismiss-stale. If an author is removed from the list mid-PR, an approval already on the current head stays until the next push. Unsettingapprove_max_severitybehaves the same way today.Residual
pull_request_review_thread: resolvedpath). It needs these six conditions:approve_max_severityset and the author passesapprove_authors);(head SHA, set of resolved thread ids)marker;max_roundscap isn't reached;gatejob skips any head SHA that already has a consolidated review. "Explain, then resolve" pushes no commit, so a re-review on the same SHA must bypass that check. The resolved-set marker would replace it.concurrency:block deliberately keeps thread events out of thetriggerslot so that resolving a thread never cancels a panel. Sharing the slot with label-triggered rounds, as the ticket asks, means makingcancel-in-progressdepend on the event, and pending runs of the two kinds can then replace each other.auto-approve.pyand the tests, which is too much to add to this unattended PR.approve_authors: ${{ vars.CURSOR_APPROVE_AUTHORS }}and the variable set to the DRI's login. It's a separate repo and is out of scope for this PR.Provenance
ApproveAuthorsTest: an unlisted author getsoffand no review event, a listed or empty-list author gets the normal APPROVE / REQUEST_CHANGES, the gate step's parse is run from the YAML against 11 cases, and the wiring is pinnedcheck_workflow_pins.py,check_agents_md.py,check-org-repo-literals.shall pass🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.