Repository navigation
fix: refuse a release merge when the guard cannot read the PR - #335
Merged
Merged
Conversation
A failed gh lookup used to print that the pull was safe to merge. The 0.10.0 title is chore(main): release patchloom 0.10.0. The guard now exits 2 when the title cannot be read, and any autorelease label counts as a release. A fake-gh test covers that title. Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
On Windows the tools/call test deleted the server cwd while the process still held it, so rmdir failed with EBUSY. Wait for exit, then retry the delete. Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
macOS /bin/bash treats "${repo_args[@]}" as unbound when the array is
empty and set -u is on. The guard then exited before it could read the
title. Call gh with --repo only when GH_REPO is set.
Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
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.
Summary
The release merge guard exits 2 when it cannot read the pull request title. That used to print "safe to merge". The title
chore(main): release patchloom 0.10.0is still a release, and anyautorelease:label counts too.The MCP tools/call test waits for the server to exit before deleting its directory, then retries if Windows still has the folder locked.
Why
On the 0.10.0 release, the guard printed that pull request 332 was not a release. A later run classified that same title. A failed
ghlookup must not be treated as permission to merge.Verification
bash scripts/guard-no-release-merge.test.sh: the 0.10.0 title exits 1, an approved bypass exits 0, a failedghand an empty title exit 2.bash scripts/guard-no-release-merge.sh 332exits 1.npm run check: 462 passed, 3 skipped, line coverage 92.63%, package ok.Checklist
git commit -snpm run checkand it passes