Skip to content

Commit 24928c0

Browse files
Emmanuel AlozieEmmanuel Alozie
Emmanuel Alozie
authored and
Emmanuel Alozie
committed
fix: update generate-commit.js to reset before generating commit
1 parent b7fcb46 commit 24928c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

generate-commit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { config } from "dotenv";
44
import chalk from "chalk";
5+
import { exec } from "child_process";
56
config();
67

78
import { GoogleGenerativeAI } from "@google/generative-ai";
@@ -30,6 +31,7 @@ export async function generateCommit(input) {
3031
const text = response.text();
3132
return text;
3233
} catch (error) {
34+
exec("git reset");
3335
console.log(chalk.red(`${error}`));
3436
process.exit(1);
3537
}

0 commit comments

Comments
 (0)