From 6002dbd987f49a3c0a134910d9c7bca975b79977 Mon Sep 17 00:00:00 2001 From: Oleksii Shytikov <107051036+oshytiko@users.noreply.github.com> Date: Tue, 31 Mar 2026 17:38:41 +0200 Subject: [PATCH 1/2] Fix reading `.changeset` directory from path provided in `cwd` parameter (#502) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adding informational message about resolved `cwd` location * Reading changesets information from provided folder * Adding changeset information * Apply suggestion from @Andarist --------- Co-authored-by: Mateusz Burzyński --- .changeset/plenty-areas-tie.md | 5 +++++ src/index.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/plenty-areas-tie.md diff --git a/.changeset/plenty-areas-tie.md b/.changeset/plenty-areas-tie.md new file mode 100644 index 0000000..663b731 --- /dev/null +++ b/.changeset/plenty-areas-tie.md @@ -0,0 +1,5 @@ +--- +"@changesets/action": patch +--- + +Making sure that `.changeset` information is picked up, when `cwd` parameter is provided diff --git a/src/index.ts b/src/index.ts index 7021e49..c4356d5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,6 +20,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined; } const cwd = path.resolve(getOptionalInput("cwd") ?? ""); + core.info(`using resolved cwd: ${cwd}`); const octokit = setupOctokit(githubToken); const commitMode = getOptionalInput("commitMode") ?? "git-cli"; @@ -45,7 +46,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined; `machine github.com\nlogin github-actions[bot]\npassword ${githubToken}` ); - let { changesets } = await readChangesetState(); + let { changesets } = await readChangesetState(cwd); let publishScript = core.getInput("publish"); let hasChangesets = changesets.length !== 0; From 81b3f61ebffcb868f73e4c0b2682517149c834a2 Mon Sep 17 00:00:00 2001 From: Rafi Adnan Date: Tue, 31 Mar 2026 11:47:34 -0400 Subject: [PATCH 2/2] Fixed `.changeset` state being picked for the version command when `cwd` parameter is provided (#536) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * actually use cwd parameter when reading changeset state * tweak changeset --------- Co-authored-by: Mateusz Burzyński --- .changeset/plenty-areas-tie.md | 2 +- .changeset/splendid-facts-like.md | 5 +++++ src/index.ts | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/splendid-facts-like.md diff --git a/.changeset/plenty-areas-tie.md b/.changeset/plenty-areas-tie.md index 663b731..3422a5e 100644 --- a/.changeset/plenty-areas-tie.md +++ b/.changeset/plenty-areas-tie.md @@ -2,4 +2,4 @@ "@changesets/action": patch --- -Making sure that `.changeset` information is picked up, when `cwd` parameter is provided +Fixed initial `.changeset` state being picked up, when `cwd` parameter is provided diff --git a/.changeset/splendid-facts-like.md b/.changeset/splendid-facts-like.md new file mode 100644 index 0000000..e2c9a52 --- /dev/null +++ b/.changeset/splendid-facts-like.md @@ -0,0 +1,5 @@ +--- +"@changesets/action": patch +--- + +Fixed `.changeset` state being picked for the version command when `cwd` parameter is provided diff --git a/src/index.ts b/src/index.ts index c4356d5..d8d1cc9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -143,6 +143,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined; githubToken, git, octokit, + cwd, prTitle: getOptionalInput("title"), commitMessage: getOptionalInput("commit"), hasPublishScript,