mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Merge remote-tracking branch 'origin/main' into add-draft-mode-support
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@changesets/action": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed initial `.changeset` state being picked up, when `cwd` parameter is provided
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@changesets/action": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed `.changeset` state being picked for the version command when `cwd` parameter is provided
|
||||||
+3
-1
@@ -20,6 +20,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cwd = path.resolve(getOptionalInput("cwd") ?? "");
|
const cwd = path.resolve(getOptionalInput("cwd") ?? "");
|
||||||
|
core.info(`using resolved cwd: ${cwd}`);
|
||||||
|
|
||||||
const octokit = setupOctokit(githubToken);
|
const octokit = setupOctokit(githubToken);
|
||||||
const commitMode = getOptionalInput("commitMode") ?? "git-cli";
|
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}`
|
`machine github.com\nlogin github-actions[bot]\npassword ${githubToken}`
|
||||||
);
|
);
|
||||||
|
|
||||||
let { changesets } = await readChangesetState();
|
let { changesets } = await readChangesetState(cwd);
|
||||||
|
|
||||||
let publishScript = core.getInput("publish");
|
let publishScript = core.getInput("publish");
|
||||||
let hasChangesets = changesets.length !== 0;
|
let hasChangesets = changesets.length !== 0;
|
||||||
@@ -142,6 +143,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
|||||||
githubToken,
|
githubToken,
|
||||||
git,
|
git,
|
||||||
octokit,
|
octokit,
|
||||||
|
cwd,
|
||||||
prTitle: getOptionalInput("title"),
|
prTitle: getOptionalInput("title"),
|
||||||
commitMessage: getOptionalInput("commit"),
|
commitMessage: getOptionalInput("commit"),
|
||||||
hasPublishScript,
|
hasPublishScript,
|
||||||
|
|||||||
Reference in New Issue
Block a user