ci: keep ClawSweeper comment dispatch best effort

This commit is contained in:
Peter Steinberger
2026-05-11 11:00:27 +01:00
parent e31af364ab
commit 1327f6742f

View File

@@ -225,11 +225,17 @@ jobs:
"" \
"Command router queued. I will update this comment with the next step.")"
status_payload="$(jq -nc --arg body "$status_body" '{body:$body}')"
status_response="$(GH_TOKEN="$TARGET_TOKEN" gh api \
status_err="$(mktemp)"
if status_response="$(GH_TOKEN="$TARGET_TOKEN" gh api \
"repos/$TARGET_REPO/issues/$ITEM_NUMBER/comments" \
--method POST \
--input - <<< "$status_payload")"
status_comment_id="$(jq -r '.id // empty' <<< "$status_response")"
--input - <<< "$status_payload" 2>"$status_err")"; then
status_comment_id="$(jq -r '.id // empty' <<< "$status_response")"
else
cat "$status_err" >&2
echo "::warning::Could not create ClawSweeper queued status comment; dispatching command router without one."
fi
rm -f "$status_err"
;;
esac
fi