.github/workflows/labels.yml — wake the sweep over REST, so a board event reconciles in seconds (#205) #213
1 changed files with 7 additions and 1 deletions
|
|
@ -136,7 +136,13 @@ check "any non-204 fails, not only the statuses the API documents" 1 "forbidden"
|
|||
run_step_no_api() {
|
||||
rm -rf "${TMP:?}/bin"; mkdir -p "$TMP/bin"; : >"$TMP/calls"
|
||||
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"
|
||||
}
|
||||
check "an unset GITHUB_API_URL refuses rather than guessing GitHub" 1 \
|
||||
|
|
|
|||
Loading…
Reference in a new issue