End-to-end pipeline for a newly submitted PR: code review → service health → Discord sync.
All steps are deterministic shell + jq; no gh required (falls back to git diff).
Run from inside the target git repository:
bash
bash scripts/run.sh --base origin/main --head HEAD --repo myrepo --pr 130
This prints the combined JSON report, saves a copy to reports/, and posts an
embed to Discord when DISCORD_WEBHOOK_URL is set.
EnvPurposeDefaultDISCORD_WEBHOOK_URLDiscord channel webhook for deliveryunset → payload saved to reports/, exit 3HEALTHCHECK_CMDOverride health command (must emit JSON)healthcheck skill healthcheck.sh --json``PR_AUTOCHECK_AI``1 allow optional AI deepening, 0 skip1
scripts/review.sh BASE HEAD — deterministic review of the diff. Flags
hardcoded secrets, dynamic eval/exec, debug prints, TODO/FIXME, oversized
diffs. Emits {status, files_changed, findings[], summary}.healthcheck skill ( --json) when available,
otherwise reports unknown instead of failing the pipeline.scripts/notify-discord.sh — builds a color-coded Discord embed from the
combined report and POSTs it to the webhook. No webhook = no fake success:
it saves the payload and exits 3 so callers can surface "delivery pending".scripts/run.sh orchestrates all three and computes an overall severity
( ok / warn / critical).
Point your PR event (CI job, GitHub Action, or OpenClaw cron) at:
bash
DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..." \
bash scripts/run.sh --base "$BASE_SHA" --head "$HEAD_SHA" --repo "$REPO" --pr "$PR_NUMBER"
Exit code is 0 (pipeline ran); inspect the JSON overall field and the
discord_exit line on stderr to gate merges or alert.