Skip to content

pr-standards: needs:issue is applied to every v2-targeted PR despite a valid closing reference #51970

Closed as duplicate

Description

@Veld101

Description

pr-standards marks every PR that targets a non-default base with needs:issue, even when the PR description contains Closes #123 / Fixes #123 and the referenced issue exists.

pr-standards.yml reads closingIssuesReferences, which GitHub only populates when a PR targets the repository's default branch (dev). For a v2-targeted PR it is always 0. The v2 copy of the workflow already falls back to matching closing keywords in the description, but pull_request_target runs the workflow from the default branch, so the dev copy is the one that executes and it has no fallback.

Effect: every v2 PR is labelled needs:issue and receives the "This PR doesn't have a linked issue" comment regardless of its description, and editing the description cannot clear it.

Steps to reproduce

  1. Open a PR against v2 whose description contains Closes #<open-issue>.
  2. Observe needs:issue on the PR and the bot comment, even though the reference is valid.

Expected

A PR that references an existing issue in its description should not be labelled needs:issue for any base branch.

Context

  • The fallback exists on v2 only (git diff upstream/dev upstream/v2 -- .github/workflows/pr-standards.yml).
  • It does not block merge in practice (fix(tui): don't crash when fs.watch throws (e.g. ENOSPC) #51210 merged with the label), but it is misleading and the comment says the merge is blocked, which wastes contributor and maintainer time.

Activity

  1. github-actions commented on Sep 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

    • #51057: Reports the same false-positive needs:issue label on v2-targeted PRs because the workflow running from the default branch lacks the PR-body fallback.
  2. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for the report. We're tracking this same incorrect needs:issue label on v2-targeted pull requests in #51057, so I'm closing this as a duplicate. Please follow that issue for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions