-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Problem
When Copilot SWE agent is assigned to an issue and creates a PR, the PR description does not include GitHub closing keywords like Fixes #N, Closes #N, or Resolves #N. This means the original issue does not auto-close when the PR is merged, requiring manual cleanup.
Despite having the instruction in three separate places:
.github/copilot-instructions.md→Include Fixes #ISSUE_NUMBER in PR body- Workflow comment instructions →
Create a PR with Fixes #$ISSUE_NUM in the description - Issue assignment comments → Same instruction
Copilot consistently ignores this instruction. Tested across 10+ PRs — none included closing keywords.
Expected Behavior
When Copilot creates a PR from an issue assignment, it should automatically include Fixes #<issue_number> in the PR description. The agent knows which issue it was assigned to — it should reference it with a closing keyword.
Current Workaround
We added a step in our copilot-automation.yml workflow that detects Copilot PRs missing closing keywords and auto-injects Fixes #N by:
- Querying GraphQL
closingIssuesReferences - Searching for open issues assigned to
copilot-swe-agent[bot] - Extracting
#Nreferences from the PR body
This works but is unnecessary complexity that should be handled natively by the agent.
Proposal
When copilot-swe-agent[bot] creates a PR from an issue assignment, automatically include Fixes #<issue_number> in the PR body. This is a standard GitHub convention that every human developer follows — the agent should too.
Impact
- Every repo using Copilot SWE agent for automated issue fixing
- Without this, issues accumulate as open even after their fix PRs are merged
- Breaks CI/CD pipelines that rely on issue auto-close for state management