chore(claude): make the merge gate fail closed
The first review found ways around the hook: unexpected errors exited with non-blocking codes, unusual spellings of the merge path skipped it, and an older pass outlived a newer fail. The ask rule for merges is back as a second layer, so merging outside /merge is enforced, not just instructed.
This commit is contained in:
1 parent
737a3a29ec
commit
f45fb7421a
5 files changed
+73
-39
No files matched your search
@@ -94,7 +94,7 @@ Never write a `pass` marker for a SHA you did not review, or when an important f
|
||||
|
||||
## 8. Merge
|
||||
|
||||
1. Run `.claude/scripts/gitea.sh POST $REPO/pulls/<number>/merge @<json file>` with `{"Do":"merge","head_commit_id":"<sha>"}`, so only the commit CI and the review checked can merge. The `guard-merge.sh` hook refuses the call without a matching `pass` comment.
|
||||
1. Run `.claude/scripts/gitea.sh POST $REPO/pulls/<number>/merge @<json file>` with `{"Do":"merge","head_commit_id":"<sha>"}`, so only the commit CI and the review checked can merge. Run it exactly in this form, alone. The `guard-merge.sh` hook refuses any other form, and refuses the call unless the newest review comment is a `pass` for this SHA. This call asks the user for permission: that prompt is the one intended pause of the run. If the user declines, stop.
|
||||
2. Run `git fetch origin main:main`, then `git switch main`.
|
||||
|
||||
## 9. Report
|
||||
|
||||
Reference in new issue
Block a user