Detect the eligibility label correctly and report the verdict - #3412
Merged
Conversation
gh pr view --jq takes a single expression and no --arg, so the label lookup failed with "accepts at most 1 arg(s), received 4" and HAS_LABEL came back empty. The removal branch could never be reached: a PR that stopped being eligible would have kept its label and still merged. Listing the names and matching with grep -Fxq works. The run summary also gains the context it lacked — title, page, size, source PR — a verdict that states what happens next rather than just pass or fail, and a line recording whether the label was added, removed or left alone.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pwizla
commented
Aug 26, 2026
pwizla
left a comment
Collaborator
Author
There was a problem hiding this comment.
Sounds good, let's merge to test again in prod 🤞
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.
The run on #3366 came out green, but its log carried an error:
accepts at most 1 arg(s), received 4.gh pr view --jqtakes a single expression and no--arg, so the label lookup returned nothing andHAS_LABELwas always empty. The consequence is worse than the message suggests: the removal branch could never be reached, so a PR that stopped being eligible — a new commit adding a heading, say — would have kept its label and still been merged by the cron. That is exactly what the label lifecycle exists to prevent.Verified on a PR carrying the label:
HAS_LABELwas''instead oftrue. Listing the names and matching withgrep -Fxqreturnstruewith the label andfalsewithout.The run summary also gains what it was missing:
flag: don't mergeescape hatch spelled out