Skip to content

Update PR-linking guidance to prevent cross-repo issues from auto-closing - #37534

Open
wadepickett with Copilot wants to merge 3 commits into
mainfrom
copilot/update-pr-linking-guidance
Open

Update PR-linking guidance to prevent cross-repo issues from auto-closing#37534
wadepickett with Copilot wants to merge 3 commits into
mainfrom
copilot/update-pr-linking-guidance

Conversation

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Section 6 of .github/copilot-instructions.md and the PR template both told authors to always use Fixes #[issue-number]. For a PR authored in this docs repo against an issue that lives in another repo (e.g. dotnet/aspnetcore), that keyword auto-closes an issue that should stay open, and a bare #[issue-number] resolves to the wrong same-numbered issue in this repo.

Changes

  • .github/copilot-instructions.md (Section 6) — First-line reference rules split by issue origin:
    • Same-repo: Fixes #[issue-number] (auto-close, unchanged default).
    • Cross-repo: Contributes to [owner]/[repo]#[issue-number] (links without closing).
    • Exceptions: partial same-repo fix → Contributes to #[issue-number]; maintainer-requested cross-repo close → Fixes [owner]/[repo]#[issue-number].
    • Bare #[issue-number] disallowed for cross-repo refs. Also refreshed ms.date.
  • .github/PULL_REQUEST_TEMPLATE.md — Rewrote the instructions comment to mirror the same same-repo/cross-repo split so it doesn't reintroduce the auto-close behavior.

Out of scope

  • .github/skills/whats-new-include-content-rules/SKILL.md — always same-repo, no cross-repo exposure.
  • .github/agents/breakingchange.agent.md — not modified.

Guidance-only change; enforcement (e.g. a status check validating the first PR-description line) is noted in the issue as a possible follow-up.

Copilot AI and others added 2 commits August 25, 2026 20:13
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Copilot AI changed the title [WIP] Update copilot-instructions.md PR-linking guidance Update PR-linking guidance to prevent cross-repo issues from auto-closing Aug 25, 2026
Copilot AI requested a review from wadepickett August 25, 2026 20:16
@wadepickett
wadepickett marked this pull request as ready for review August 25, 2026 21:13
@wadepickett
wadepickett requested a lite review from Copilot August 25, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates contributor/agent guidance in the .github meta files to prevent cross-repository issues from being accidentally auto-closed (or incorrectly linked) due to using Fixes #... with an unqualified issue reference in PR descriptions.

Changes:

  • Updated Section 6 in .github/copilot-instructions.md to distinguish same-repo vs cross-repo issue references (closing vs non-closing, and requiring fully-qualified cross-repo references).
  • Updated .github/PULL_REQUEST_TEMPLATE.md to mirror the same guidance so the template doesn’t reintroduce the problematic pattern.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/copilot-instructions.md Replaces the “always use Fixes #[issue-number]” guidance with same-repo vs cross-repo rules, plus exceptions.
.github/PULL_REQUEST_TEMPLATE.md Updates the PR template instructions comment to match the revised linking/closing guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

Update copilot-instructions.md PR-linking guidance to prevent cross-repository issues from auto-closing

4 participants