From dab6c42e6d782de80e75d53308e7e6a4a631ca63 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 1 Jun 2025 11:46:54 +0200 Subject: [PATCH] Remove unused code from main.js --- main.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/main.js b/main.js index d338f7d..758e6c2 100644 --- a/main.js +++ b/main.js @@ -1101,27 +1101,7 @@ function getRandomMessage() { */ // Nutze das Template aus dem Projektordner: -const TEMPLATE_PATH = path.join(__dirname, 'rewrite-commit-msg.js.template'); -function createRewriteScript(mapping) { - // Lies das Template - let content = fs.readFileSync(TEMPLATE_PATH, 'utf-8'); - // Ersetze __MESSAGE_MAP__ durch dein Mapping - content = content.replace('__MESSAGE_MAP__', JSON.stringify(mapping)); - // Speichere als temporäre Datei - const scriptPath = path.join(__dirname, `rewrite-commit-msg.${Date.now()}.js`); - fs.writeFileSync(scriptPath, content, 'utf-8'); - return scriptPath; -} - -function addMatchingFilesToGitignore(folderPath, pattern) { - const files = fs.readdirSync(folderPath); - const matches = micromatch(files, pattern); - for (const file of matches) { - ensureInGitignore(folderPath, pattern); - break; // Nur einmal pro Pattern eintragen - } -} async function autoCommit(folderPath, message, win) {