Skip to content

Detect the eligibility label correctly and report the verdict - #3412

Merged
pwizla merged 1 commit into
mainfrom
repo/fix-label-detection-and-report
Aug 26, 2026
Merged

Detect the eligibility label correctly and report the verdict#3412
pwizla merged 1 commit into
mainfrom
repo/fix-label-detection-and-report

Conversation

@pwizla

@pwizla pwizla commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The run on #3366 came out green, but its log carried an error: accepts at most 1 arg(s), received 4.

gh pr view --jq takes a single expression and no --arg, so the label lookup returned nothing and HAS_LABEL was 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_LABEL was '' instead of true. Listing the names and matching with grep -Fxq returns true with the label and false without.

The run summary also gains what it was missing:

  • Context up front — title, page, size, link to the source strapi/strapi PR — so the report can be read without opening the PR
  • A verdict that says what happens next: merged by the cron in 24 hours, or held for review, with the flag: don't merge escape hatch spelled out
  • A line recording whether the label was added, removed, or left alone

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.
@pwizla pwizla self-assigned this Aug 26, 2026
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Building Building Preview Aug 26, 2026 2:45pm

Request Review

@github-actions github-actions Bot added internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels Aug 26, 2026

@pwizla pwizla left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good, let's merge to test again in prod 🤞

@pwizla
pwizla merged commit 93245e4 into main Aug 26, 2026
8 of 9 checks passed
@pwizla
pwizla deleted the repo/fix-label-detection-and-report branch August 26, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant