Add a human-merge label that keeps autopilot from merging
ci / lint (pull_request) Successful in 12s
ci / lint (pull_request) Successful in 12s
autopilot skips both human checkpoints: approval before the build and the merge. Scheduled update issues in homelab want the hands-off build but a human merge, since merging there deploys. With human-merge also on the issue, @pm is told to hand back at phase 3 and publish.sh refuses MERGE_PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
85be0a3288
commit
cbe3e3cbc0
6 files changed
+28
-13
No files matched your search
@@ -44,7 +44,7 @@ if [ -z "$name" ]; then
|
||||
# mode=skip so every later step no-ops — a red run for a non-agent comment is just noise.
|
||||
echo "no known agent mentioned (word-boundary) — skipping run"
|
||||
{ echo "name=none"; echo "model=none"; echo "fallback="; echo "vision=false"; echo "mode=skip"; echo "skills=[]";
|
||||
echo "branch=main"; echo "new=false"; echo "autopilot=false"; echo "issnum=$NUM"; } >> "$GITHUB_OUTPUT"
|
||||
echo "branch=main"; echo "new=false"; echo "autopilot=false"; echo "automerge=false"; echo "issnum=$NUM"; } >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
@@ -121,10 +121,12 @@ fi
|
||||
issnum="$NUM"
|
||||
case "$IS_PR" in ?*) issnum=$(printf '%s' "$branch_ref" | sed -nE 's,^ai/issue-([0-9]+).*,\1,p');; esac
|
||||
[ -z "$issnum" ] && issnum="$NUM"
|
||||
autopilot=false
|
||||
if curl -sS -H "Authorization: token $GT" "$API/issues/$issnum/labels" 2>/dev/null \
|
||||
| jq -e 'any(.[]?; .name=="autopilot")' >/dev/null 2>&1; then
|
||||
# `human-merge` alongside it keeps the hands-off build but leaves the merge to a human.
|
||||
labels=$(curl -sS -H "Authorization: token $GT" "$API/issues/$issnum/labels" 2>/dev/null)
|
||||
autopilot=false; automerge=false
|
||||
if printf '%s' "$labels" | jq -e 'any(.[]?; .name=="autopilot")' >/dev/null 2>&1; then
|
||||
autopilot=true
|
||||
printf '%s' "$labels" | jq -e 'any(.[]?; .name=="human-merge")' >/dev/null 2>&1 || automerge=true
|
||||
fi
|
||||
echo "autopilot (autopilot label on #$issnum)=$autopilot"
|
||||
{ echo "autopilot=$autopilot"; echo "issnum=$issnum"; } >> "$GITHUB_OUTPUT"
|
||||
echo "autopilot (autopilot label on #$issnum)=$autopilot automerge=$automerge"
|
||||
{ echo "autopilot=$autopilot"; echo "automerge=$automerge"; echo "issnum=$issnum"; } >> "$GITHUB_OUTPUT"
|
||||
Reference in new issue
Block a user