Skip to content

ci: fix CLI-branch injection env var typo (BRNACH → BRANCH)#586

Merged
pranavz28 merged 1 commit into
masterfrom
PER-9772_fix-cli-branch-injection-typo
Jun 29, 2026
Merged

ci: fix CLI-branch injection env var typo (BRNACH → BRANCH)#586
pranavz28 merged 1 commit into
masterfrom
PER-9772_fix-cli-branch-injection-typo

Conversation

@pranavz28

Copy link
Copy Markdown
Contributor

What

The Set up @percy/cli from git step in test.yml sets env var BRNACH (typo) but the clone reads $BRANCH:

env:
  BRNACH: ${{ github.event.inputs.branch }}   # typo
run: |
  git clone --branch "$BRANCH" --depth 1 https://github.com/percy/cli   # $BRANCH is empty

So on a workflow_dispatch run, $BRANCH is empty and git clone --branch "" fails — CLI-branch regression for this SDK never actually ran. One-character fix: BRNACHBRANCH.

Why

Part of PER-9772 (run SDK regression against an unpublished @percy/cli branch). This SDK looked injection-capable but was silently broken.

Safety

No behavior change beyond fixing the var name. branch is still env-passed and validated by the existing regex-match step before this step runs.

Test plan

  • workflow_dispatch with a known @percy/cli branch → clone/build/link succeeds and npx percy --version reflects the branch.

🤖 Generated with Claude Code

The 'Set up @percy/cli from git' step set BRNACH but the git clone reads
$BRANCH, so on a workflow_dispatch run $BRANCH was empty and
`git clone --branch ""` failed — CLI-branch regression never actually ran.

Part of PER-9772.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pranavz28
pranavz28 marked this pull request as ready for review June 29, 2026 11:48
@pranavz28
pranavz28 requested a review from a team as a code owner June 29, 2026 11:48
@pranavz28
pranavz28 merged commit 6ebf180 into master Jun 29, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants