chore: add read-only CI wait to the Gitea helper
Polling CI with a shell loop triggered a permission prompt during /merge. A dedicated WAIT command can be allowlisted on its own.
This commit is contained in:
1 parent
339dcdd214
commit
282e1c5236
3 files changed
+32
-4
No files matched your search
@@ -71,11 +71,11 @@ Unless one exists, run `.claude/scripts/gitea.sh POST $REPO/pulls @<json file>`
|
||||
|
||||
## 6. Wait for CI
|
||||
|
||||
Get the SHA with `git rev-parse HEAD`, then repeat `.claude/scripts/gitea.sh GET $REPO/commits/<sha>/status` until the state settles.
|
||||
Get the SHA with `git rev-parse HEAD`, then run `.claude/scripts/gitea.sh WAIT $REPO/commits/<sha>/status` as a background command. Do not write a polling loop, because that causes a permission prompt.
|
||||
|
||||
- `success`: continue.
|
||||
- `failure` or `error`: stop, and report the failing check and its `target_url`.
|
||||
- No statuses after about two minutes: workflows are path-filtered, so treat this as no CI for this PR and continue.
|
||||
- Exit 0: checks passed, or it printed `no CI ran` because workflows are path-filtered. Continue.
|
||||
- Exit 1: stop, and report the failing check and its `target_url`.
|
||||
- Exit 3: CI timed out. Stop and report it.
|
||||
|
||||
Then run `.claude/scripts/gitea.sh GET $REPO/pulls/<number>` and confirm `mergeable` is true.
|
||||
|
||||
|
||||
Reference in new issue
Block a user