Skip to content

fix(ci): apply the PR body issue fallback on the default branch copy - #51058

Closed
Tsuki-hash wants to merge 1 commit into
anomalyco:devfrom
Tsuki-hash:ci-issue-fallback
Closed

Tsuki-hash wants to merge 1 commit into
anomalyco:devfrom
Tsuki-hash:ci-issue-fallback

Conversation

@Tsuki-hash

@Tsuki-hash Tsuki-hash commented Sep 24, 2026 •

Copy link
Copy Markdown

Issue for this PR

Fixes #51057 (#51057)

Type of change

  • Bug fix

What does this PR do?

#43964 taught pr-standards to fall back to the PR description, because closingIssuesReferences is
only populated when a PR targets the default branch. That change landed on v2 and never reached dev,
and pull_request_target runs the default branch's copy of the workflow — so the fallback exists in the
tree that ships and is dead in the copy that executes. The job log of #51052 is the proof: its
check-standards script contains if (linkedIssues === 0) and no hasBodyIssueRef.

This copies those same nine lines into dev's file. No other behavior changes; PRs against dev are
unaffected in practice because they already get a real closing reference.

Disclosure: two of the mislabeled PRs are mine (#51038, #51052), so merging this removes a label from my
own work. #51035 and #51043 are other people's and carry the same label for the same reason.

How did you verify your code works?

Screenshots / recordings

No UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

"Tested locally" is the file/script comparison, the syntax check and the regex replay above; the workflow itself was not executed.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@Veld101

Veld101 commented Sep 27, 2026

Copy link
Copy Markdown

One gap this change does not close by itself, in case it is worth handling here.

The job only triggers on opened/edited/synchronize, and for a v2 base the only removeLabel('needs:issue') paths never fire (skipIssueCheck does not apply to fix titles, and linkedIssues > 0 is always false). So once this is merged, the existing labeled PRs will not clear themselves — around 141 today — until each author pushes or edits, or someone removes the labels in bulk.

A workflow_dispatch path (or a one-off cleanup) would finish the job. Context and the per-PR evidence are in #51057.

@Tsuki-hash

Copy link
Copy Markdown
Author

Correct, and thanks for the per-PR table in #51057 - it is the first independent confirmation of this, with 8 data points instead of my 2.

On handling the backfill here: I would rather not. A workflow_dispatch run has no pull_request payload, so it needs a separate listing-and-evaluate path rather than reusing the event script, and bundling that into a nine-line backport makes the change harder to review for the maintainers who have to merge it. What this PR does fix is the cause; after it lands, each already-labeled PR clears on its next edited/synchronize because the body check now succeeds and the fall-through removeLabel is reachable. If a maintainer wants the bulk pass as well, I will open it as its own PR with the dispatch path.

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pr-standards needs:issue is a false positive for v2-based PRs because the runner uses the dev copy of the workflow

3 participants