From bc7dbecd16ae040f89ce85e8c58b562b94ea8f81 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 7 Jan 2026 11:53:04 +0000
Subject: [PATCH 01/10] Initial plan
From 75c9762f8023704b43108d0875813559f5427450 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 7 Jan 2026 11:56:30 +0000
Subject: [PATCH 02/10] Add Changesets GitHub action and PR bot workflows
Co-authored-by: abernier <76580+abernier@users.noreply.github.com>
---
.github/workflows/changesets-bot.yml | 30 +++++++++++++++++++++++++
.github/workflows/release.yml | 33 ++++++++++++++++++++++++++++
package.json | 1 +
3 files changed, 64 insertions(+)
create mode 100644 .github/workflows/changesets-bot.yml
create mode 100644 .github/workflows/release.yml
diff --git a/.github/workflows/changesets-bot.yml b/.github/workflows/changesets-bot.yml
new file mode 100644
index 00000000..e8bae209
--- /dev/null
+++ b/.github/workflows/changesets-bot.yml
@@ -0,0 +1,30 @@
+name: Changesets Bot
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened, labeled, unlabeled]
+
+jobs:
+ changesets-bot:
+ name: Changesets Bot
+ runs-on: ubuntu-latest
+ # Skip the changesets bot on release PRs created by the release workflow
+ if: ${{ !startsWith(github.head_ref, 'changeset-release/') }}
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Check for changesets
+ uses: changesets/action@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..40a207e5
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,33 @@
+name: Release
+
+on:
+ push:
+ branches:
+ - main
+
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
+jobs:
+ release:
+ name: Release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Create Release Pull Request or Publish to npm
+ id: changesets
+ uses: changesets/action@v1
+ with:
+ publish: npm run release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/package.json b/package.json
index 513d64f7..5851536e 100644
--- a/package.json
+++ b/package.json
@@ -48,6 +48,7 @@
"format": "prettier --write .",
"check-format": "prettier --check .",
"check-exports": "attw --pack . --ignore-rules cjs-resolves-to-esm no-resolution",
+ "release": "npm run build && changeset publish",
"local-release": "npm run ci && changeset version && changeset publish"
},
"peerDependencies": {
From bee5bf5714c3ec8d5d9f452ebf721f0dabc20822 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 7 Jan 2026 11:57:53 +0000
Subject: [PATCH 03/10] Add contributing section with changeset instructions to
README
Co-authored-by: abernier <76580+abernier@users.noreply.github.com>
---
README.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/README.md b/README.md
index 9a99072a..096cedac 100644
--- a/README.md
+++ b/README.md
@@ -27,3 +27,13 @@ A simple component that renders "Hello World".
```tsx
```
+
+## Contributing
+
+When submitting a pull request, please include a changeset to document your changes:
+
+```bash
+npx changeset
+```
+
+This helps us maintain the changelog and version the package appropriately.
From 3cdb6ac2fba25fe3a9cb8ec5c4d5b24246dd1e88 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 7 Jan 2026 11:59:49 +0000
Subject: [PATCH 04/10] Add explicit permissions blocks to workflows for
security
Co-authored-by: abernier <76580+abernier@users.noreply.github.com>
---
.github/workflows/changesets-bot.yml | 4 ++++
.github/workflows/release.yml | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/.github/workflows/changesets-bot.yml b/.github/workflows/changesets-bot.yml
index e8bae209..b5e0d9f6 100644
--- a/.github/workflows/changesets-bot.yml
+++ b/.github/workflows/changesets-bot.yml
@@ -4,6 +4,10 @@ on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
+permissions:
+ contents: read
+ pull-requests: write
+
jobs:
changesets-bot:
name: Changesets Bot
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 40a207e5..0f28adf3 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,6 +7,11 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}
+permissions:
+ contents: write
+ pull-requests: write
+ id-token: write
+
jobs:
release:
name: Release
From 86993fb1fcfb0c75d00281319d108922b88d2e51 Mon Sep 17 00:00:00 2001
From: Antoine BERNIER
Date: Wed, 7 Jan 2026 13:00:47 +0100
Subject: [PATCH 05/10] Change Node.js version setup to use .nvmrc
---
.github/workflows/changesets-bot.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/changesets-bot.yml b/.github/workflows/changesets-bot.yml
index b5e0d9f6..adc41471 100644
--- a/.github/workflows/changesets-bot.yml
+++ b/.github/workflows/changesets-bot.yml
@@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
- node-version: '20'
+ node-version-file: '.nvmrc'
- name: Install Dependencies
run: npm install
From 77c59ffb42ad302f4b0404a09cb93f0feeecba88 Mon Sep 17 00:00:00 2001
From: Antoine BERNIER
Date: Wed, 7 Jan 2026 13:01:16 +0100
Subject: [PATCH 06/10] Use .nvmrc for Node.js version in workflow
---
.github/workflows/release.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0f28adf3..cb322813 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
- node-version: '20'
+ node-version-file: '.nvmrc'
- name: Install Dependencies
run: npm install
From 0a3d44b780df43e12c33eead22138999a666ae96 Mon Sep 17 00:00:00 2001
From: Antoine BERNIER
Date: Wed, 7 Jan 2026 13:01:57 +0100
Subject: [PATCH 07/10] Change npm install to npm ci in workflow
---
.github/workflows/changesets-bot.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/changesets-bot.yml b/.github/workflows/changesets-bot.yml
index adc41471..d22b0320 100644
--- a/.github/workflows/changesets-bot.yml
+++ b/.github/workflows/changesets-bot.yml
@@ -26,7 +26,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install Dependencies
- run: npm install
+ run: npm ci
- name: Check for changesets
uses: changesets/action@v1
From e7d5289c6a3eee4fbdf4bccba4bab9ed7307be80 Mon Sep 17 00:00:00 2001
From: Antoine BERNIER
Date: Wed, 7 Jan 2026 13:02:13 +0100
Subject: [PATCH 08/10] Change npm install to npm ci for dependency management
---
.github/workflows/release.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cb322813..57bb3b3f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -26,7 +26,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install Dependencies
- run: npm install
+ run: npm ci
- name: Create Release Pull Request or Publish to npm
id: changesets
From 4468b95e2c313f4a6547add69b15743184597728 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 7 Jan 2026 12:07:14 +0000
Subject: [PATCH 09/10] Fix Changesets Bot to properly check for changesets and
comment on PRs
Co-authored-by: abernier <76580+abernier@users.noreply.github.com>
---
.github/workflows/changesets-bot.yml | 61 ++++++++++++++++++++++++----
1 file changed, 52 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/changesets-bot.yml b/.github/workflows/changesets-bot.yml
index d22b0320..6e7b529f 100644
--- a/.github/workflows/changesets-bot.yml
+++ b/.github/workflows/changesets-bot.yml
@@ -20,15 +20,58 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v4
+ - name: Check for changesets
+ id: check-changesets
+ run: |
+ # Count changeset files (excluding README.md and config.json)
+ CHANGESET_COUNT=$(find .changeset -name "*.md" ! -name "README.md" | wc -l)
+ echo "count=$CHANGESET_COUNT" >> $GITHUB_OUTPUT
+ if [ "$CHANGESET_COUNT" -eq 0 ]; then
+ echo "No changesets found"
+ exit 1
+ else
+ echo "Found $CHANGESET_COUNT changeset(s)"
+ fi
+
+ - name: Comment on PR
+ if: failure() && steps.check-changesets.outcome == 'failure'
+ uses: actions/github-script@v7
with:
- node-version-file: '.nvmrc'
+ script: |
+ const { data: comments } = await github.rest.issues.listComments({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ });
+
+ const botComment = comments.find(comment =>
+ comment.user.type === 'Bot' &&
+ comment.body.includes('No changesets found')
+ );
+
+ const commentBody = '## ⚠️ No changesets found\n\n' +
+ 'This PR doesn\'t include any changesets. If this PR contains changes that should be included in the changelog and trigger a version bump, please add a changeset.\n\n' +
+ 'To add a changeset, run:\n' +
+ '```bash\n' +
+ 'npx changeset\n' +
+ '```\n\n' +
+ 'Then commit the generated file.\n\n' +
+ 'If this PR doesn\'t require a changeset (e.g., documentation updates, CI changes), you can ignore this message.';
+
+ if (botComment) {
+ await github.rest.issues.updateComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ comment_id: botComment.id,
+ body: commentBody,
+ });
+ } else {
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ body: commentBody,
+ });
+ }
- - name: Install Dependencies
- run: npm ci
- - name: Check for changesets
- uses: changesets/action@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From 3063af1e09f68a670a49f8afa4a76a7e55b016b4 Mon Sep 17 00:00:00 2001
From: Antoine BERNIER
Date: Wed, 7 Jan 2026 13:09:16 +0100
Subject: [PATCH 10/10] Delete .github/workflows/changesets-bot.yml
---
.github/workflows/changesets-bot.yml | 77 ----------------------------
1 file changed, 77 deletions(-)
delete mode 100644 .github/workflows/changesets-bot.yml
diff --git a/.github/workflows/changesets-bot.yml b/.github/workflows/changesets-bot.yml
deleted file mode 100644
index 6e7b529f..00000000
--- a/.github/workflows/changesets-bot.yml
+++ /dev/null
@@ -1,77 +0,0 @@
-name: Changesets Bot
-
-on:
- pull_request:
- types: [opened, synchronize, reopened, labeled, unlabeled]
-
-permissions:
- contents: read
- pull-requests: write
-
-jobs:
- changesets-bot:
- name: Changesets Bot
- runs-on: ubuntu-latest
- # Skip the changesets bot on release PRs created by the release workflow
- if: ${{ !startsWith(github.head_ref, 'changeset-release/') }}
- steps:
- - name: Checkout Repo
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: Check for changesets
- id: check-changesets
- run: |
- # Count changeset files (excluding README.md and config.json)
- CHANGESET_COUNT=$(find .changeset -name "*.md" ! -name "README.md" | wc -l)
- echo "count=$CHANGESET_COUNT" >> $GITHUB_OUTPUT
- if [ "$CHANGESET_COUNT" -eq 0 ]; then
- echo "No changesets found"
- exit 1
- else
- echo "Found $CHANGESET_COUNT changeset(s)"
- fi
-
- - name: Comment on PR
- if: failure() && steps.check-changesets.outcome == 'failure'
- uses: actions/github-script@v7
- with:
- script: |
- const { data: comments } = await github.rest.issues.listComments({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: context.issue.number,
- });
-
- const botComment = comments.find(comment =>
- comment.user.type === 'Bot' &&
- comment.body.includes('No changesets found')
- );
-
- const commentBody = '## ⚠️ No changesets found\n\n' +
- 'This PR doesn\'t include any changesets. If this PR contains changes that should be included in the changelog and trigger a version bump, please add a changeset.\n\n' +
- 'To add a changeset, run:\n' +
- '```bash\n' +
- 'npx changeset\n' +
- '```\n\n' +
- 'Then commit the generated file.\n\n' +
- 'If this PR doesn\'t require a changeset (e.g., documentation updates, CI changes), you can ignore this message.';
-
- if (botComment) {
- await github.rest.issues.updateComment({
- owner: context.repo.owner,
- repo: context.repo.repo,
- comment_id: botComment.id,
- body: commentBody,
- });
- } else {
- await github.rest.issues.createComment({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: context.issue.number,
- body: commentBody,
- });
- }
-
-