Skip to content

Add automated npmdiff.dev comment on Changesets “Version Packages” PRs#986

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/comment-on-changeset-prs
Draft

Add automated npmdiff.dev comment on Changesets “Version Packages” PRs#986
Copilot wants to merge 1 commit into
mainfrom
copilot/comment-on-changeset-prs

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This PR adds an automated comment to Changesets release PRs with direct npmdiff.dev links for every package version bump, making post-merge package output comparison fast from the PR itself.

  • What this enables

    • On Version Packages PRs (changeset-release/*), the workflow posts/updates a single bot comment containing per-package diff links:
      • package name
      • previous version → next version
      • npmdiff.dev compare URL
  • Workflow implementation

    • Added .github/workflows/changeset-pr-npmdiff-comment.yml
    • Trigger: pull_request_target on opened, reopened, synchronize
    • Guarded execution to only run for in-repo Changesets release PRs
    • Uses actions/github-script to:
      • enumerate changed files in the PR
      • detect plugin package manifests (plugins/@sanity/*/package.json, plugins/sanity-plugin-*/package.json)
      • read base/head package.json and extract version deltas
      • skip non-version changes and private packages
      • create/update one idempotent comment via marker
  • Documentation update

    • Updated CONTRIBUTING.md release flow to include the automated npmdiff.dev comment step on “Version Packages” PRs.
if: >
  github.event.pull_request.head.repo.full_name == github.repository &&
  startsWith(github.event.pull_request.head.ref, 'changeset-release/') &&
  startsWith(github.event.pull_request.title, 'Version Packages')

@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 154e452

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

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Jun 12, 2026 2:41pm

Request Review

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.

2 participants