CI: Avoid shallow checkout for Chromatic job#34483
Conversation
|
View your CI Pipeline Execution ↗ for commit dcf8696
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
This PR updates the dynamically generated CI helpers so the Chromatic job can opt out of the default shallow git checkout, reducing the chance of Chromatic history being misattributed after rebases.
Changes:
- Extend
workflow.restoreLinux()/workflow.restoreWindows()to accept git checkout options. - Configure the Chromatic job to run with
shallow: falsecheckout settings.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
scripts/ci/utils/helpers.ts |
Adds optional checkout options to workflow restore helpers and forwards them into git.checkout(...). |
scripts/ci/common-jobs.ts |
Uses the new option passing to request a deeper checkout for the Chromatic job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated CI workflow helpers to accept optional checkout configuration options. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes ✨ Finishing Touches📝 Generate docstrings
Comment |
What I did
This should fix an ongoing issue we've had with Chromatic history getting heavily polluted when rebasing branches. There was a regression in the switch to dynamically generated CI, where we stopped checking out the git history of the repo for the Chromatic job, and switched to a default shallow clone.
The PR reintroduces a deeper clone by letting us pass checkout options to the
restore*helpers. It then passesshallow: falsespecifically for Chromatic.Checklist for Contributors
Testing
Caution
THIS IS NOT COVERED BY TESTS 🚨
Manual testing
Caution
I HAVE NOT TESTED THIS 🚨
I don't know how to test this other than merge and observe it.
Documentation
ø
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit