Repository navigation
GitHub Action: a missing token fails the step instead of passing quietly; VISUALCI_TOKEN from the env works too (sc-9246) - #180
Merged
Conversation
…bot's pull request; the token can come from VISUALCI_TOKEN in the env (sc-9246)
…ecrets; runs in a fork and a deleted fork's PR skip too; CI checks the env-only token reaches every CLI call (review of sc-9246)
ndbroadbent
force-pushed
the
action-require-token
branch
from
December 4, 2026 06:51
f457eaa to
b1a0076
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sc-9246, from the case studies: a workflow that left out
token:(or misnamed its secret) got a green step and no build, because the action treated every empty token as "a fork's pull request" and skipped it with a notice.What changes
tokeninput, elseVISUALCI_TOKENfrom the workflow's or job'senv. Every step that calls the CLI uses the same fallback.pull_requestwhose head repository differs from this one, or was deleted (a fork); the notice links to theworkflow_runsetup;github.event.repository.fork), so contributors' own fork CI doesn't go red;dependabot[bot], apart fromworkflow_runandpull_request_target, which get the normal secrets); the notice says to add the token to Dependabot's secrets.pull_request_target,workflow_run,merge_group, schedules and pushes in this repository have secrets, so a missing token fails there.clientsjob, on this repository's own runs only):VISUALCI_TOKENonly inenvand a stub CLI, the action isn't skipped, and all three CLI calls (build create, upload, finalize) receive the token.visualandjourneysjobs still cover the real path withtoken:.An independent review found nothing must-fix. Its two should-fix items (Dependabot skips on events that do have secrets, and red runs in forks) and its nits (a deleted fork's PR, a sharper CI assertion, the env-only path untested, docs wording) are in f457eaa.
Release note for the next CLI tag (the action is pinned by tag, so users get this from 0.2.26): an empty token no longer skips the action outside forks and Dependabot. A workflow that relied on that (for example a scheduled job in a repository without the secret) now fails until it passes the token or drops the step.