Skip to content

Commit 713495a

Browse files
committed
fix: pass cwd to readChangesetState and runVersion
Fixes the issue where cwd parameter was not being passed to readChangesetState() and runVersion(), causing the action to fail in monorepos with nested workspaces. This is a backport of PR changesets#536 from upstream.
1 parent 04d574e commit 713495a

2 files changed

Lines changed: 51 additions & 1 deletion

File tree

dist/index.js

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
4343
`machine github.com\nlogin github-actions[bot]\npassword ${githubToken}`
4444
);
4545

46-
let { changesets } = await readChangesetState();
46+
let { changesets } = await readChangesetState(cwd);
4747

4848
let publishScript = core.getInput("publish");
4949
let hasChangesets = changesets.length !== 0;
@@ -122,6 +122,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
122122
script: getOptionalInput("version"),
123123
git,
124124
octokit,
125+
cwd,
125126
prTitle: getOptionalInput("title"),
126127
commitMessage: getOptionalInput("commit"),
127128
hasPublishScript,

0 commit comments

Comments
 (0)