Skip to content

Linked-issue detector doesn't recognize the valid owner/repo#N closing-keyword syntax #3862

Description

@JSONbored

Summary

The linked-issue detector only recognizes the bare Closes #123 / Fixes #123 form of GitHub's closing keywords. It does not recognize the fully-qualified Closes owner/repo#123 form — which is equally valid, GitHub-native closing-issue syntax — so a PR whose only closing reference uses the qualified form is scored Linked issue: ⚠️ Missing and closed under the linked-issue-required policy, even though it genuinely and correctly references an open issue.

Area

Signal logic (linked-issue detection feeding the auto-close disposition)

Expected behavior

A PR body containing Closes owner/repo#123, where owner/repo is the same repository the PR is opened against, should be recognized as a valid linked-issue reference — exactly as Closes #123 is.

Actual behavior

The detector only matches the bare #123 form. A PR using the qualified form is scored Linked issue: ⚠️ Missing and closed for "no linked issue detected," against a real, open, correctly-referenced issue.

Reproduction (real-world case, JSONbored/metagraphed)

Same author, same target issue, same content — only the closing-keyword form changed between attempts:

  1. JSONbored/metagraphed#3797 — body opens with Closes JSONbored/metagraphed#3728 (issue open at review time). Verdict: "No linked issue detected... Linked issue: ⚠️ Missing." Closed.
  2. JSONbored/metagraphed#3802 — same author, same target issue, same qualified syntax. Identical verdict. Closed.
  3. JSONbored/metagraphed#3804 — same PR content, only the closing keyword changed to bare Closes #3728. Passed linked-issue detection and merged.

Validation

  • Confirmed via the GitHub timeline for metagraphed#3728: the issue's only ClosedEvent is attributed to #3804 (bare form). #3797 and #3802 (qualified form) both cross-reference the issue in the timeline but never register as linked/connected.
  • The qualified form isn't a typo or edge case — it's documented GitHub syntax for closing an issue via a PR, and it's a natural thing for a contributor to reach for when being extra explicit about which repo's issue they mean.

Suggested fix

  • Extend the linked-issue closing-keyword match to accept owner/repo#N in addition to bare #N, treating it as a same-repo reference when owner/repo matches the PR's own repository.
  • Add a regression test asserting both forms are recognized as equivalent linked-issue evidence.

Impact

A real cost to a good-faith contributor: at least one burned two full review-and-close cycles resubmitting an otherwise-correct PR solely because of this formatting difference, before discovering by trial and error that only the bare form worked. Given how heavily linked-issue status weighs in the auto-close disposition, worth fixing promptly.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions