Skip to content

ci: reapprove internal PRs after a push dismisses an approval - #377

Open
ggprior wants to merge 2 commits into
mainfrom
georg/reapprove-internal-prs
Open

ci: reapprove internal PRs after a push dismisses an approval#377
ggprior wants to merge 2 commits into
mainfrom
georg/reapprove-internal-prs

Conversation

@ggprior

@ggprior ggprior commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Copies the reapprove-internal-prs workflow from PriorLabs/TabPFN verbatim.

Branch protection dismisses every approval when new commits are pushed. For PRs whose author and previous approver are both org members, the workflow re-approves the new head automatically. It only acts when the dismissed review was an approval and was dismissed by a push, never when a reviewer dismissed it by hand, and it skips PRs from forks.

Prerequisite: the workflow reads org membership with the PRIORLABS_ORG_MEMBERSHIP_READ_PAT secret. I could not verify that secret is exposed to this repository. If it is org-level and scoped to selected repos, tabpfn-client has to be added before merging, otherwise the membership step fails and nothing is approved.

Labelled "no changelog needed" as a CI-only change.

Branch protection dismisses approvals on every push. For PRs authored and
approved by org members that is pure overhead, so restore the approval
automatically, mirroring the workflow in PriorLabs/TabPFN.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ggprior ggprior added the no changelog needed Change needs no changelog fragment (CI-only, version bump, etc.) label Sep 4, 2026
@ggprior
ggprior marked this pull request as ready for review September 4, 2026 08:35
@ggprior
ggprior requested a review from a team as a code owner September 4, 2026 08:35
eliott-kalfon
eliott-kalfon previously approved these changes Sep 4, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e8b0f74. Configure here.

types: [dismissed]

permissions:
pull-requests: write

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow grants write permissions globally

Low Severity

This workflow sets pull-requests: write at the workflow level instead of defaulting to empty permissions and granting write only on the reapprove job. That regresses the repository convention that workflow-level permissions stay empty and each job opts in.

Fix in Cursor Fix in Web

Triggered by learned rule: GHA release workflows: SHA-pin, no interpolation, bot token

Reviewed by Cursor Bugbot for commit e8b0f74. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog needed Change needs no changelog fragment (CI-only, version bump, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants