nyegosh
Version:
AI generated commit messages, like Njegoš wrote them.
15 lines (11 loc) • 420 B
JavaScript
const fs = require("fs");
const path = require("path");
async function writeToGitCommitEditmsg(message) {
const gitPath = path.resolve(process.cwd(), ".git/COMMIT_EDITMSG");
try {
fs.writeFileSync(gitPath, message, { encoding: "utf-8" });
} catch (error) {
console.error("Error writing commit message to VS Code:", error.message.red);
}
}
module.exports = { writeToGitCommitEditmsg };