Add gitea-merge.sh for complete merge workflow

- Creates gitea-merge.sh: rebase merge, delete branch, close PR
- Updates CLAUDE.md: simplified git workflow using new script
- Adds model selection reminder to general-instructions.json
- Documents Gitea API commands in CLAUDE.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OpenCode Test
2026-01-04 13:18:23 -08:00
parent 652ceb55f0
commit 89255cc6fa
3 changed files with 114 additions and 9 deletions

View File

@@ -88,24 +88,35 @@ This repo uses Gitea (not GitHub). Follow this workflow:
3. **Rebase onto main**: `git rebase origin/main`
4. **Push branch**: `git push -u origin feature/branch-name`
5. **Create PR**: `~/.claude/automation/gitea-pr.sh "PR Title" "Description"`
6. **Merge with rebase** (after user approval):
```bash
git checkout main && git rebase feature/branch-name && git push
```
6. **Merge** (after user approval): `~/.claude/automation/gitea-merge.sh`
- Rebases onto main and pushes
- Deletes local and remote branch
- Closes PR via API
Notes:
- Use rebase, not merge commits
- Stash uncommitted state files before switching branches
- Delete feature branches after merge
- Gitea token stored at `~/.config/gitea-token`
- PRs show as "closed" (not "merged") after rebase - expected
### PR Review Policy
| Repo Type | Review Process |
|-----------|----------------|
| ~/.claude | Linting/validation only (shellcheck, JSON/YAML syntax, Python syntax) |
| Code repos | Full review via code-reviewer agent before user approval |
| Code repos | Full review via code-reviewer agent (Sonnet) before user approval |
### Gitea API Commands
```bash
# List all PRs
curl -s -H "Authorization: token $(cat ~/.config/gitea-token)" \
"https://gitea-http.taildb3494.ts.net/api/v1/repos/will/claude-code/pulls?state=all"
# Close a PR (after rebase merge)
curl -s -X PATCH \
-H "Authorization: token $(cat ~/.config/gitea-token)" \
-H "Content-Type: application/json" \
-d '{"state":"closed"}' \
"https://gitea-http.taildb3494.ts.net/api/v1/repos/will/claude-code/pulls/{PR_NUMBER}"
```
## Component Formats