Skip to content

Add changesets tool setup to mint-components#459

Open
Copilot wants to merge 9 commits intomasterfrom
copilot/add-changesets-tool-setup
Open

Add changesets tool setup to mint-components#459
Copilot wants to merge 9 commits intomasterfrom
copilot/add-changesets-tool-setup

Conversation

Copy link

Copilot AI commented Oct 14, 2025

Overview

This PR adds and configures the changesets tool to the packages/mint-components package to streamline version management and changelog generation.

Changes

Dependencies

  • Added @changesets/cli (v2.29.7) as a dev dependency

Configuration

  • Initialized .changeset directory with configuration files:
    • config.json: Configured for public npm package publishing with master as the base branch
    • README.md: Auto-generated documentation about using changesets

Scripts

Added three npm scripts for managing releases:

  • npm run changeset - Create a new changeset interactively
  • npm run version - Apply changesets and update package version/CHANGELOG
  • npm run release - Publish the package to npm

Usage

When making changes to mint-components:

  1. Create a changeset to document your changes:

    npm run changeset

    This prompts you to select the change type (patch/minor/major) and provide a summary.

  2. Version the package when ready to release:

    npm run version

    This consumes all pending changesets and updates package.json and CHANGELOG.md.

  3. Publish to npm:

    npm run release

Benefits

  • Automated version management following semver
  • Consistent changelog generation
  • Better tracking of changes between releases
  • Streamlined publishing workflow

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
    • Triggering command: node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.78/linux64/chrome-headless-shell-linux64.zip
    • Triggering command: node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Create a PR that adds and sets up the changesets tool to packages/mint-components.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: noahwc <7761715+noahwc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add and set up changesets tool to mint-components Add changesets tool setup to mint-components Oct 14, 2025
@noahwc Noah Clarke (noahwc) marked this pull request as ready for review December 5, 2025 23:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the changesets tool to the mint-components package to automate version management and changelog generation. The setup includes configuration files, npm scripts for creating changesets and publishing releases, and a GitHub Actions workflow to automate the release process when changes are merged to main.

Key Changes:

  • Added changesets dependencies and configuration
  • Created npm scripts for version management workflow
  • Added GitHub Actions workflow for automated releases
  • Documented the changeset workflow in the README

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/mint-components/package.json Added changesets dependencies and npm scripts for managing versions and releases
packages/mint-components/.changeset/config.json Configured changesets with GitHub changelog integration and baseBranch set to "master"
packages/mint-components/.changeset/README.md Auto-generated documentation about using changesets
packages/mint-components/readme.md Added comprehensive documentation about the changeset workflow and release process
.github/workflows/mint-components-merge-to-main.yml Created GitHub Actions workflow to automate version bumps and npm publishing
Files not reviewed (1)
  • packages/mint-components/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 6, 2026 23:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +37
When changesets are merged to the `main` branch, the GitHub Actions workflow will automatically:

1. Create or update a "Version Packages" pull request that:
- Bumps the version in `package.json`
- Updates `CHANGELOG.md` with all changeset summaries
- Removes the processed changeset files

2. When you're ready to release, simply **merge the "Version Packages" PR** to `main`
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section states releases happen after changesets are merged to the main branch, but the changeset config and new workflow are set up for master as the base branch. Align the documentation with the actual release branch to avoid contributors targeting the wrong branch.

Suggested change
When changesets are merged to the `main` branch, the GitHub Actions workflow will automatically:
1. Create or update a "Version Packages" pull request that:
- Bumps the version in `package.json`
- Updates `CHANGELOG.md` with all changeset summaries
- Removes the processed changeset files
2. When you're ready to release, simply **merge the "Version Packages" PR** to `main`
When changesets are merged to the `master` branch, the GitHub Actions workflow will automatically:
1. Create or update a "Version Packages" pull request that:
- Bumps the version in `package.json`
- Updates `CHANGELOG.md` with all changeset summaries
- Removes the processed changeset files
2. When you're ready to release, simply **merge the "Version Packages" PR** to `master`

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +53
x.y.z-prerelease_number
```

For example: `1.2.3-prerelease_1`, `1.2.3-prerelease_2`, etc.
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prerelease version format shown (x.y.z-prerelease_number, e.g. 1.2.3-prerelease_1) is not valid SemVer because _ is not allowed in prerelease identifiers. Use a SemVer-valid format such as 1.2.3-prerelease.1 (or 1.2.3-prerelease-1).

Suggested change
x.y.z-prerelease_number
```
For example: `1.2.3-prerelease_1`, `1.2.3-prerelease_2`, etc.
x.y.z-prerelease.number

For example: 1.2.3-prerelease.1, 1.2.3-prerelease.2, etc.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +23
name: mint-components merge to master branch
on:
push:
branches: [master]
paths:
- "packages/mint-components/**"
workflow_dispatch:

permissions:
id-token: write
contents: write
packages: write
pull-requests: write
issues: read

jobs:
deploy_storybook:
runs-on: ubuntu-latest
name: Deploy Storybook to Github Pages
defaults:
run:
working-directory: packages/mint-components
steps:
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow file/path and job naming are inconsistent with what it actually does: the filename is mint-components-merge-to-main.yml but it triggers on master, and the job is named deploy_storybook / "Deploy Storybook to Github Pages" even though there are no GitHub Pages deployment steps. Renaming these to reflect the release/changesets purpose will make future maintenance/troubleshooting easier.

Copilot uses AI. Check for mistakes.
jobs:
deploy_storybook:
runs-on: ubuntu-latest
name: Deploy Storybook to Github Pages
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use consistent capitalization: "Github" should be "GitHub" in the job name.

Suggested change
name: Deploy Storybook to Github Pages
name: Deploy Storybook to GitHub Pages

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +49
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# Runs `npm i` after changeset to make sure that `package-lock.json` files are also updated
# Without this change only `package.json` files are updated, without `package-lock.json` changes.
version: npm run version
# Runs changesets on publish - will create tags and deploy to NPM
publish: npm run release
title: "mint-components - Version Packages"
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changesets/action step will execute from the repository root (GitHub Actions defaults.run.working-directory does not apply to uses: steps). Since this repo root has no package.json, version: npm run version / publish: npm run release will fail. Update the commands to cd packages/mint-components && ... or configure the action's supported cwd/workingDirectory input (if available) so it runs within packages/mint-components.

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +27
with:
ref: ${{ github.head_ref }}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/checkout is configured with ref: ${{ github.head_ref }}, but github.head_ref is empty for push events. This can cause the workflow to check out the wrong ref or fail. Prefer omitting ref (defaults to github.sha) or set it to ${{ github.ref }} / ${{ github.sha }} for push workflows.

Suggested change
with:
ref: ${{ github.head_ref }}

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +52
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NODE_AUTH_TOKEN is set to secrets.GITHUB_TOKEN, which is not a valid authentication token for publishing to the public npm registry. Either remove NODE_AUTH_TOKEN (if using npm trusted publishing/OIDC) or set it to an npm token secret (commonly NPM_TOKEN) and ensure setup-node is configured for the npm registry.

Copilot uses AI. Check for mistakes.
@noahwc
Copy link
Contributor

Jayden Chan (@jayden-chan), wondering if we want to reconcile this with the current publish-package workflow. Changesets has become a standard across a bunch of impact repos.

@jayden-chan
Copy link
Member

Jayden Chan (@jayden-chan), wondering if we want to reconcile this with the current publish-package workflow. Changesets has become a standard across a bunch of impact repos.

None of the features in changesets are necessary for those packages, so in my opinion it's definitely not worth adding another external dependency and increasing our attack surface area just for the sake of consistency. If you want to take on the responsibility of implementing and maintaining changesets for those packages then you are welcome to, but I do not see the value and most likely won't be doing it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants