Fixed an issue with the action crashing on commit attempts in projects with commit: true (#61)

This commit is contained in:
Mateusz Burzyński
2020-11-30 08:10:04 +01:00
committed by GitHub
parent bfeb9e077e
commit 6c6b3b9bb0
3 changed files with 15 additions and 6 deletions
+8 -4
View File
@@ -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;