Uh oh!
There was an error while loading. Please reload this page.
ci(ui-preview-smoke): checkout base branch before agent runs - #2240
Conversation
The new ui-preview-smoke workflow exits early with `fatal: not in a git directory` because claude-code-action configures `git config user.name` as one of its first steps and needs a valid working tree. Add `actions/checkout@v4` pinned to the repo's default branch (not the PR head ref) so we satisfy the action's requirement without executing fork-supplied code under pull_request_target. The smoke test only drives Playwright at the deployed Vercel preview, so PR code is never needed in the runner.
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
🟢 Tier 1 — TrivialDocs, images, lock files, or a dependency bump. No functional code changes detected. Why this tier:
Review process: Auto-merge once CI passes. No human review required. Stats
|
Uh oh!
There was an error while loading. Please reload this page.
PR Review✅ No critical issues found. Small, well-scoped CI fix. A few notes:
|
Deep ReviewScope: 1 file, +11 lines in ✅ No critical issues found. Conservative posture is preserved (no fork-head checkout, no credential persistence, no fork code execution path). Two compositional concerns worth considering before merge. 🟡 P2 -- recommended
🔵 P3 nitpicks (1)
Reviewers (7): correctness, security, adversarial, reliability, testing, maintainability, project-standards. Testing gaps:
|
E2E Test Results✅ All tests passed • 165 passed • 3 skipped • 1203s
Tests ran across 4 shards in parallel. |
Summary
Fixes the brand-new
ui-preview-smokeworkflow (#2238). On its first run it failed with:claude-code-actionconfiguresgit config user.nameas one of its first steps and requires a valid working tree to run. The original workflow skippedactions/checkoutbecause the agent only drives Playwright at the deployed preview URL and never needs the repo source — but the action itself does.Adds
actions/checkout@v4pinned to the repo's default branch (github.event.repository.default_branch) before the agent step. We deliberately don't check out the PR head ref: this workflow runs underpull_request_target, and we'd rather not execute fork-supplied code in the runner. The base branch is sufficient to satisfy the action.persist-credentials: falsesince the agent has its owngithub_tokenalready.How to test on Vercel preview
N/A — CI workflow change.
References