chore(claude): close remaining gaps in the merge gate
Checks / Secret Scan (pull_request) Successful in 8s
Checks / Lint (pull_request) Successful in 9s

Gitea's issue comments endpoint ignores paging, so the hook now reads all
comments in one call; the paged loop refused every merge. Any command that
calls gitea.sh and mentions a merge must now be the strict form as a whole,
while commands that only name gitea.sh as a file (git add, git diff) pass.
The body may only pin the head commit, and curl calls have time limits so
the hook can't time out into a non-blocking error.
This commit is contained in:
kasun committed 2026-11-27 03:57:18 +01:00
1 parent f45fb7421a
commit 1e02dd5930
4 files changed
+59 -35

No files matched your search

+3 -1
View File
@@ -90,11 +90,13 @@ Then run `.claude/scripts/gitea.sh GET $REPO/pulls/<number>` and confirm `mergea
4. Run `.claude/scripts/gitea.sh POST $REPO/issues/<number>/comments @<json file>` with `{"body": "<comment>"}`.
5. On `fail`, stop and report the important findings. Do not fix them in this run; the user decides.
Never edit a review comment; post a new one. The merge hook refuses PRs with edited review comments.
Never write a `pass` marker for a SHA you did not review, or when an important finding is open. The merge hook only checks that the marker exists, so the honesty of the marker is on you.
## 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. 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.
1. Run `.claude/scripts/gitea.sh POST $REPO/pulls/<number>/merge @<absolute path of json file>` with exactly `{"Do":"merge","head_commit_id":"<sha>"}` and no other fields, 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