mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Fixed an issue with the action crashing on commit attempts in projects with commit: true (#61)
This commit is contained in:
+8
-4
@@ -250,11 +250,15 @@ ${
|
||||
})();
|
||||
|
||||
const finalPrTitle = `${prTitle}${!!preState ? ` (${preState.tag})` : ""}`;
|
||||
const finalCommitMessage = `${commitMessage}${
|
||||
!!preState ? ` (${preState.tag})` : ""
|
||||
}`;
|
||||
|
||||
await gitUtils.commitAll(finalCommitMessage);
|
||||
// project with `commit: true` setting could have already committed files
|
||||
if (!(await gitUtils.checkIfClean())) {
|
||||
const finalCommitMessage = `${commitMessage}${
|
||||
!!preState ? ` (${preState.tag})` : ""
|
||||
}`;
|
||||
await gitUtils.commitAll(finalCommitMessage);
|
||||
}
|
||||
|
||||
await gitUtils.push(versionBranch, { force: true });
|
||||
|
||||
let searchResult = await searchResultPromise;
|
||||
|
||||
Reference in New Issue
Block a user