.github/workflows/labels.yml — wake the sweep over REST, so a board event reconciles in seconds (#205) #213

Merged
andres merged 6 commits from build/205-dispatch-rest into main 2026-08-05 18:08:33 +00:00
Showing only changes of commit 3bde48f24c - Show all commits

View file

@ -136,7 +136,13 @@ check "any non-204 fails, not only the statuses the API documents" 1 "forbidden"
run_step_no_api() { run_step_no_api() {
rm -rf "${TMP:?}/bin"; mkdir -p "$TMP/bin"; : >"$TMP/calls" rm -rf "${TMP:?}/bin"; mkdir -p "$TMP/bin"; : >"$TMP/calls"
make_curl 204 "" make_curl 204 ""
env PATH="$TMP/bin:$PATH" GITHUB_TOKEN=tok GITHUB_REPOSITORY=owner/repo \ # -u, because plain `env` PRESERVES the parent environment: on the runner
# every step arrives with GITHUB_API_URL set — the premise of the fix under
# test — so without the unset this case inherits it, the refusal path never
# executes, and the case passes only in a dev shell that lacks the variable
# (@kimi-reviewer-andresmgsl, run 468).
env -u GITHUB_API_URL \
PATH="$TMP/bin:$PATH" GITHUB_TOKEN=tok GITHUB_REPOSITORY=owner/repo \
SWEEP_WORKFLOW=self-labels-sweep.yml DEFAULT_BRANCH=main "$STEP" SWEEP_WORKFLOW=self-labels-sweep.yml DEFAULT_BRANCH=main "$STEP"
} }
check "an unset GITHUB_API_URL refuses rather than guessing GitHub" 1 \ check "an unset GITHUB_API_URL refuses rather than guessing GitHub" 1 \