ci: move changeset-version to shared config#6944
Conversation
|
📝 WalkthroughWalkthroughConsolidates the Changeset preview workflow to use TanStack's centralized reusable actions and removes two local helper scripts that previously generated preview reports and upserted PR comments. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
|
View your CI Pipeline Execution ↗ for commit 9763726
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/changeset-preview.yml:
- Around line 24-26: The workflow is using floating refs for shared actions
("uses: TanStack/config/.github/setup@main" and "uses:
TanStack/config/.github/changeset-preview@main"); replace these with immutable
refs by pinning each to a commit SHA or an immutable release tag (e.g., change
the two "uses: TanStack/config/.github/setup@main" and "uses:
TanStack/config/.github/changeset-preview@main" entries to their corresponding
full commit SHAs or tagged versions) so the CI uses a fixed, auditable action
version.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 66386f23-647c-4c94-892e-d694cb99e037
📒 Files selected for processing (3)
.github/workflows/changeset-preview.ymlscripts/benchmarks/common/upsert-pr-comment.mjsscripts/preview-changeset-versions.mjs
💤 Files with no reviewable changes (2)
- scripts/preview-changeset-versions.mjs
- scripts/benchmarks/common/upsert-pr-comment.mjs
| uses: TanStack/config/.github/setup@main | ||
| - name: Changeset Preview | ||
| uses: TanStack/config/.github/changeset-preview@main |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify mutable action refs in workflow files.
# Expected after fix: no matches.
fd -e yml -e yaml .github/workflows \
| xargs rg -nP '^\s*uses:\s*[^@]+@(main|master)\b'Repository: TanStack/router
Length of output: 434
🏁 Script executed:
#!/bin/bash
# Verify mutable action refs in workflow files - corrected syntax
fd --full-path '.github/workflows' -e yml -e yaml | xargs rg -nP 'uses:\s*[^@]+@(main|master)\b'Repository: TanStack/router
Length of output: 43
🏁 Script executed:
#!/bin/bash
# Also directly read the specific file and lines mentioned
cat -n .github/workflows/changeset-preview.yml | sed -n '20,30p'Repository: TanStack/router
Length of output: 347
Pin shared workflow actions to immutable refs instead of @main.
Lines 24 and 26 use floating branch refs, which makes CI behavior mutable and increases supply-chain risk if upstream main changes. Pin both actions to full commit SHAs (or immutable release tags).
🔒 Suggested change
- name: Setup Tools
- uses: TanStack/config/.github/setup@main
+ uses: TanStack/config/.github/setup@<full-commit-sha>
- name: Changeset Preview
- uses: TanStack/config/.github/changeset-preview@main
+ uses: TanStack/config/.github/changeset-preview@<full-commit-sha>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/changeset-preview.yml around lines 24 - 26, The workflow
is using floating refs for shared actions ("uses:
TanStack/config/.github/setup@main" and "uses:
TanStack/config/.github/changeset-preview@main"); replace these with immutable
refs by pinning each to a commit SHA or an immutable release tag (e.g., change
the two "uses: TanStack/config/.github/setup@main" and "uses:
TanStack/config/.github/changeset-preview@main" entries to their corresponding
full commit SHAs or tagged versions) so the CI uses a fixed, auditable action
version.
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/changeset-preview.yml (1)
22-24:⚠️ Potential issue | 🟠 MajorPin shared workflow refs to immutable versions.
Line 22 and Line 24 still use floating
@mainrefs. That keeps CI behavior mutable and weakens supply-chain guarantees. Please pin bothuses:entries to immutable commit SHAs (or immutable release tags).#!/bin/bash # Verify floating refs in this workflow (expected after fix: no matches) rg -nP '^\s*uses:\s*TanStack/config/.+@(main|master)\b' .github/workflows/changeset-preview.yml🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/changeset-preview.yml around lines 22 - 24, Replace the floating refs for the TanStack shared workflows so they’re pinned to immutable commits/tags: update the two uses entries "uses: TanStack/config/.github/setup@main" and "uses: TanStack/config/.github/changeset-preview@main" to use specific commit SHAs or release tags (e.g., @<full-commit-sha> or `@vX.Y.Z`) instead of `@main`; ensure both occurrences are updated and verify by running the provided ripgrep check to confirm no remaining matches to `@main` or `@master`.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/changeset-preview.yml:
- Around line 22-24: Replace the floating refs for the TanStack shared workflows
so they’re pinned to immutable commits/tags: update the two uses entries "uses:
TanStack/config/.github/setup@main" and "uses:
TanStack/config/.github/changeset-preview@main" to use specific commit SHAs or
release tags (e.g., @<full-commit-sha> or `@vX.Y.Z`) instead of `@main`; ensure both
occurrences are updated and verify by running the provided ripgrep check to
confirm no remaining matches to `@main` or `@master`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1191f6cd-79f4-49d9-bcbc-7a178ec706be
📒 Files selected for processing (1)
.github/workflows/changeset-preview.yml
|
@lachlancollins could you restore the |
Oh damn, I didn't realise it was used by another workflow, sorry! I'll fix shortly. |
Takes #6937 and moves it to TanStack/config#356 as a shareable action for all TanStack projects
Summary by CodeRabbit