Skip to content

Commit d4ba979

Browse files
committed
ci(shard-timings): judge GH_TOKEN on the dry-run leg too
gh reads GH_TOKEN from the environment, so no shell expansion names it and a pull_request dry run never starts gh: an env: omission there would still surface only on the scheduled leg. Name it once, under set -u's sibling ${VAR:?}, so both legs judge it. Claude-Session: https://claude.ai/code/session_013RDBh5DqXd2xnLwvHLgLFr Co-authored-by: Claude <noreply@anthropic.com>
1 parent caf5b79 commit d4ba979

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎.github/workflows/shard-timings-refresh.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,10 @@ jobs:
690690
echo "::error::DRY_RUN is '$DRY_RUN' on a pull_request run. A pull_request run of this lane never pushes a branch, opens a PR or writes a label. Nothing was pushed."
691691
exit 1
692692
fi
693+
# `gh` reads GH_TOKEN from the environment, not from an argument, so no
694+
# expansion below would notice it missing and a dry run never starts
695+
# `gh`. Named here, it is judged on both legs like every other key.
696+
: "${GH_TOKEN:?is not set; gh would run unauthenticated. Nothing was pushed.}"
693697
694698
# outward [--stand-in TEXT] COMMAND...
695699
# The one dry-run switch. Live, it runs COMMAND. Dry, it prints COMMAND

0 commit comments

Comments
 (0)