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
+5
View File
@@ -59,3 +59,8 @@ export const commitAll = async (message: string) => {
await exec("git", ["add", "."]);
await exec("git", ["commit", "-m", message]);
};
export const checkIfClean = async (): Promise<boolean> => {
const { stdout } = await execWithOutput("git", ["status", "--porcelain"]);
return !stdout.length;
};