From c2b5997ed2876e566b7bf19e4a21c2ada4af33f7 Mon Sep 17 00:00:00 2001 From: Leo Miranda Date: Thu, 29 Jan 2026 01:47:24 +0000 Subject: [PATCH] Add "lessons/patterns/use-fixes-n-keyword-for-automatic-issue-closing-in-prs" --- ...rd-for-automatic-issue-closing-in-prs.-.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 lessons%2Fpatterns%2Fuse-fixes-n-keyword-for-automatic-issue-closing-in-prs.-.md diff --git a/lessons%2Fpatterns%2Fuse-fixes-n-keyword-for-automatic-issue-closing-in-prs.-.md b/lessons%2Fpatterns%2Fuse-fixes-n-keyword-for-automatic-issue-closing-in-prs.-.md new file mode 100644 index 0000000..6652984 --- /dev/null +++ b/lessons%2Fpatterns%2Fuse-fixes-n-keyword-for-automatic-issue-closing-in-prs.-.md @@ -0,0 +1,40 @@ +## Context + +- Created PR #292 with "Partial fix for #290" in the body +- Expected Gitea to link the PR to the issue +- Issue remained open after PR was merged + +## Problem + +Gitea only auto-closes issues when specific keywords are used: +- `Fixes #N` +- `Closes #N` +- `Resolves #N` + +Using "Partial fix for #290" does NOT trigger auto-close because "Partial" is not a recognized keyword. + +## Solution + +For PRs that fully address an issue: +- Use `Fixes #N` in the PR body or commit message + +For PRs that partially address an issue: +- Use `Fixes #N` if you want auto-close anyway +- OR manually close the issue after merge +- Consider creating separate issues for remaining work + +## Prevention + +When creating PRs: +1. Always use `Fixes #N` format for issue linking +2. If partial fix, decide upfront: auto-close or keep open +3. Add remaining work items to issue comment before closing +4. Or create follow-up issues for remaining criteria + +## Related + +- Issue: #290 +- PR: #292 + +--- +**Tags:** gitea, pr, issue-linking, workflow, auto-close \ No newline at end of file