Auto-close linked issues when external PRs are merged via bot
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- github-actions
- Domain
- ci-cd
Research direction
Start by reading .github/workflows/pr-merge.yml and trace how the “Merge External PR” body is built from the original pull request. Verify the workflow preserves Fixes, Closes, and Resolves references, then confirm that a merge into main causes the referenced issue to close automatically.
Written by the indexing model from the issue text.
Description
Description
When an external PR includes closing keywords (e.g. Fixes #N), the referenced issue is not automatically closed after merge.
This happens because external PRs are first merged into an intermediate branch (main-pr<N>) instead of main. GitHub only auto-closes issues when changes are merged into the default branch.
See: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#about-linked-issues-and-pull-requests
The "Merge External PR" created by the pr-merge.yml workflow merges the intermediate branch into main, but it does not preserve the closing keywords from the original PR body.
Example
PR #545 includes Fixes #207, but after it is merged, issue #207 remains open.
Proposed solution
Update .github/workflows/pr-merge.yml to extract closing keywords (Fixes, Closes, Resolves) from the original PR body and include them in the merge PR body.
Since the merge PR targets main, GitHub should process these keywords and automatically close the referenced issues.
- Dominant language
- Go
- Stars
- 298
- Forks
- 202
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 28
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from urunc-dev/urunc
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
do-not-merge invalid
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100