Skip to content

ci: changeset preview workflow#6937

Merged
birkskyum merged 3 commits intomainfrom
ci--changeset-preview-workflow
Mar 16, 2026
Merged

ci: changeset preview workflow#6937
birkskyum merged 3 commits intomainfrom
ci--changeset-preview-workflow

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Mar 16, 2026

preview what workspace package versions will be bumped by changesets - because the changeset github bot isn't reliable

Summary by CodeRabbit

  • Chores
    • Added automated changeset version preview workflow to pull requests. When a PR modifies changeset entries, a comment is automatically generated and posted showing the calculated version bumps (major, minor, or patch) for affected packages.

@changeset-bot
Copy link

changeset-bot bot commented Mar 16, 2026

⚠️ No Changeset found

Latest commit: 73894c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f7df276b-e47e-4bab-88cf-555531ce3fab

📥 Commits

Reviewing files that changed from the base of the PR and between 268bff2 and 73894c2.

📒 Files selected for processing (2)
  • .github/workflows/changeset-preview.yml
  • scripts/preview-changeset-versions.mjs

📝 Walkthrough

Walkthrough

This pull request adds a GitHub Actions workflow and supporting Node.js script that automatically generates and posts changeset version previews to pull requests. The workflow triggers on changeset modifications, runs the script to compare current and post-changeset package versions, and updates a PR comment with the version bump analysis.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/changeset-preview.yml
New workflow triggered on PRs affecting .changeset directory. Configures job concurrency, runs setup action, executes preview script, and posts/updates PR comment with changeset version preview using upsert utility.
Changeset Preview Script
scripts/preview-changeset-versions.mjs
New Node.js script that snapshots package versions, runs changeset versioning, compares against original versions, classifies bumps (major/minor/patch) by type (explicit vs. dependency), renders Markdown summary with collapsible sections, and outputs to file or stdout. Includes CLI argument parsing and restores changeset config after execution.

Sequence Diagram

sequenceDiagram
    participant PR as Pull Request
    participant GHA as GitHub Actions
    participant Script as Preview Script
    participant Pkg as Package System
    participant API as GitHub API

    PR->>GHA: Trigger workflow (changeset modified)
    GHA->>Script: Execute preview-changeset-versions.mjs
    Script->>Pkg: Snapshot current package versions
    Script->>Pkg: Run changeset version
    Script->>Pkg: Read updated package versions
    Script->>Script: Diff and classify version bumps
    Script->>Script: Render Markdown preview
    Script->>GHA: Output preview content
    GHA->>API: Post/update PR comment with preview
    API->>PR: Display changeset preview
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A changeset preview takes flight,
Bumps and versions shining bright!
Scripts and workflows dance as one,
Comments posted, preview done.
GitHub's clarity, complete! ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci--changeset-preview-workflow
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Mar 16, 2026

View your CI Pipeline Execution ↗ for commit 73894c2

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1m 51s View ↗
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-16 12:05:18 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

Changeset Version Preview

12 package(s) bumped directly, 19 bumped as dependents.

Direct bumps

Package Bump Version
@tanstack/router-devtools-core minor 1.166.9 → 1.167.0
@tanstack/router-ssr-query-core minor 1.166.9 → 1.167.0
@tanstack/solid-start minor 1.166.14 → 1.167.0
@tanstack/start-client-core minor 1.166.11 → 1.167.0
@tanstack/start-server-core minor 1.166.11 → 1.167.0
@tanstack/vue-router minor 1.167.3 → 1.168.0
@tanstack/vue-start minor 1.166.14 → 1.167.0
@tanstack/react-router patch 1.167.3 → 1.167.4
@tanstack/react-start patch 1.166.14 → 1.166.15
@tanstack/router-core patch 1.167.3 → 1.167.4
@tanstack/router-plugin patch 1.166.12 → 1.166.13
@tanstack/solid-router patch 1.167.3 → 1.167.4
Dependency bumps (19)
Package Bump Version
@tanstack/react-router-devtools patch 1.166.9 → 1.166.10
@tanstack/react-router-ssr-query patch 1.166.9 → 1.166.10
@tanstack/react-start-client patch 1.166.12 → 1.166.13
@tanstack/react-start-server patch 1.166.12 → 1.166.13
@tanstack/router-cli patch 1.166.11 → 1.166.12
@tanstack/router-devtools patch 1.166.9 → 1.166.10
@tanstack/router-generator patch 1.166.11 → 1.166.12
@tanstack/router-vite-plugin patch 1.166.12 → 1.166.13
@tanstack/solid-router-devtools patch 1.166.9 → 1.166.10
@tanstack/solid-router-ssr-query patch 1.166.9 → 1.166.10
@tanstack/solid-start-client patch 1.166.11 → 1.166.12
@tanstack/solid-start-server patch 1.166.11 → 1.166.12
@tanstack/start-plugin-core patch 1.166.14 → 1.166.15
@tanstack/start-static-server-functions patch 1.166.13 → 1.166.14
@tanstack/start-storage-context patch 1.166.11 → 1.166.12
@tanstack/vue-router-devtools patch 1.166.9 → 1.166.10
@tanstack/vue-router-ssr-query patch 1.166.9 → 1.166.10
@tanstack/vue-start-client patch 1.166.11 → 1.166.12
@tanstack/vue-start-server patch 1.166.11 → 1.166.12

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.

1 participant