Skip to content

codev check pr reports a closing reference when the PR body only mentions the keyword in prose #2018

Backlog

Description

@waleedkadous

Problem

codev check pr <n> reports linked issue "Closes #N" — matches <branch> when the PR body only mentions the keyword in prose and does not use it.

Seen on PR #2004 (2026-11-29). Its body said:

Refs #1647. The close keyword is left out on purpose: … Swap in Closes #1647 if the merge should close it.

The check printed "Closes #1647" — matches builder/spir-1647. GitHub would not have closed the issue on merge, so the line told the reader the opposite of the truth.

Root cause (not yet confirmed in code)

The linked-issue line appears to search the body text for a closing keyword followed by an issue number, wherever it occurs, including inside inline code and inside a sentence about the keyword.

Fix (prescribed)

Report what GitHub will act on, not what the text contains: read the PR's closingIssuesReferences from the forge (GraphQL, or gh pr view --json closingIssuesReferences) and print those. If the body mentions a closing keyword that GitHub did not link, say so on the same line (for example: no closing reference; body mentions "Closes #1647" in text). Keep it an info line.

Testing

  • A PR whose body uses Closes #N on its own: reported as linked.
  • A PR whose body says Refs #N and quotes Closes #N in backticks or prose: reported as not linked, with the mention noted.
  • A PR with no reference: unchanged output.

Suggested protocol: BUGFIX.

Activity

  1. added
    area/core
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions