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] 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;