ci(frontend): skip Chromatic on fork PRs#7823
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7823 +/- ##
=======================================
Coverage 98.59% 98.59%
=======================================
Files 1467 1467
Lines 57332 57332
=======================================
Hits 56525 56525
Misses 807 807 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Failed testsfirefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
GitHub withholds repo secrets from pull_request runs originating from forks, so CHROMATIC_PROJECT_TOKEN is empty and the job fails with 'Missing project token' on every community PR (e.g. #7733). Guard the job to run only for same-repo PRs and pushes; main's post-merge push still runs Chromatic with full secrets, so coverage isn't lost. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5aa91ab to
3b4cc56
Compare
Changes
Chromatic fails with
✖ Missing project tokenon every community / fork PR (e.g. #7733). GitHub deliberately withholds repo secrets frompull_requestruns originating from forks, soCHROMATIC_PROJECT_TOKENis empty and the job can't run.This guards the
chromaticjob to run only for same-repo PRs and pushes:Fork PRs now skip Chromatic instead of showing a spurious red check. Visual coverage isn't lost — the existing post-merge
push: [main]run executes Chromatic with full secrets (the same fallback the workflow already relied on for Dependabot).This extends the existing Dependabot handling to all forks, since it's the same root cause (no secret access on fork runs).
How did you test this code?
ifevaluates correctly for each case: push → runs, same-repo PR → runs, fork PR → skips, Dependabot → skips.