Repository navigation
ci(release): block release approval by the authors of the released PRs - #5255
Open
feliperalmeida wants to merge 1 commit into
Open
feliperalmeida wants to merge 1 commit into
feliperalmeida wants to merge 1 commit into
Conversation
feliperalmeida
force-pushed
the
felipe/release-approval-guard
branch
from
October 8, 2026 18:40
f657253 to
086dbc9
Compare
Contributor
📝 No Changeset FoundThis PR doesn't include a changeset. A changeset is required to release a new version. How to add a changesetRun this command and follow the prompts: pnpm changesetRemember: Never use |
Contributor
|
[Critical impact] The workflow changes appear safe to merge; no blocking issue was established. Reviews (1) · Last reviewed commit: f657253 · Reviewed by Greptile |
This branch has not been deployed
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.
Problem
The
NPM Releaseenvironment has "Prevent self-review" turned on, which stops the run's triggering actor from approving the release. Before the merge queue, that actor was the person who merged the PR. Now the push tomaincomes fromgithub-merge-queue[bot], so nobody is excluded and a PR author can approve their own release (example run).Changes
release-approval-guardaction (PostHog/.github#79) as the first real step ofversion-bump.NPM Releaseapprover authored one of them or added it to the queue (merged_by).version-bumpactions: read(to read the run's approvals) andpull-requests: read(to read the PRs).On
workflow_dispatchruns the guard does nothing, because GitHub's own check already excludes whoever started the run.If a release is blocked: start the workflow again with "Run workflow", and have a different maintainer approve it. A re-run of the blocked run may fail again, because GitHub's approvals API doesn't separate run attempts.
Like the setting it replaces, it only covers the PRs in the triggering push. If a release also publishes earlier unreleased changes, their authors aren't excluded.
Release info Sub-libraries affected
Libraries affected
None. This changes CI only.
Checklist
main, so the first release after merge is the first real run.If releasing new changes
pnpm changesetto generate a changeset file: not needed, nothing to release.🤖 Agent context
Autonomy: Human-driven (agent-assisted)