From f7089a31df933c8a5e83c527ad6ea602fb94a2ca Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Fri, 20 Feb 2026 14:30:31 -0600 Subject: [PATCH] store: Gitea auto-close only triggers on direct merge to default branch, not via staging branch --- ...rs-on-direct-merge-to-default-br-4a8de1.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 graph/decisions/gitea-auto-close-only-triggers-on-direct-merge-to-default-br-4a8de1.md diff --git a/graph/decisions/gitea-auto-close-only-triggers-on-direct-merge-to-default-br-4a8de1.md b/graph/decisions/gitea-auto-close-only-triggers-on-direct-merge-to-default-br-4a8de1.md new file mode 100644 index 00000000000..b98dcea85a1 --- /dev/null +++ b/graph/decisions/gitea-auto-close-only-triggers-on-direct-merge-to-default-br-4a8de1.md @@ -0,0 +1,40 @@ +--- +id: 4a8de106-5272-4a7f-9b06-cf1ef3d323b4 +type: decision +title: "Gitea auto-close only triggers on direct merge to default branch, not via staging branch" +tags: [gitea, ci-cd, release-workflow, issues, next-release, major-domo, decision] +importance: 0.65 +confidence: 0.8 +created: "2026-02-20T20:30:31.724623+00:00" +updated: "2026-02-20T20:30:31.724623+00:00" +--- + +# Gitea Auto-Close Issue Limitation + +## Context +Project: major-domo and any repo using a staging branch pattern (feature → next-release → main). + +## Problem +Gitea's `closes #XX` keyword in commit messages **only auto-closes issues** when the commit lands directly in the default branch (main). With a staging pattern: + +1. `feature → next-release` merge: does NOT close issues (not the default branch) +2. `next-release → main` PR merge: uses a merge commit that does NOT contain the original commit messages with `closes #XX` keywords + +Result: issues are never auto-closed, even when the code resolves them. + +## Workaround +Manually close resolved issues after merging next-release to main: + +```bash +tea issues close --repo cal/major-domo-v2 --id +``` + +Closed 11 issues manually after one release cycle. + +## Alternatives to Consider +- Close issues via the PR description on the final main merge PR (may work if the PR body supports closes syntax) +- Write a post-merge script/workflow to parse commit messages and close referenced issues +- Switch to direct branch → main workflow if staging complexity isn't needed + +## Key Takeaway +Don't rely on `closes #XX` auto-close when using staging branches. Budget time for manual issue hygiene after each release.