1
0

[auto] change main.js

This commit is contained in:
2025-05-23 23:00:45 +02:00
parent c5e6a6d299
commit f20e0d2010

View File

@@ -125,7 +125,7 @@ function startMonitoringWatcher(folderPath, win) {
watcher.on('all', async (event, changedPath) => { watcher.on('all', async (event, changedPath) => {
debug(`[MONITOR] ${event} in ${changedPath}`); debug(`[MONITOR] ${event} in ${changedPath}`);
// Hier einfach auto-commit Funktion rufen: // Hier einfach auto-commit Funktion rufen:
await autoCommit(folderPath, `[auto] ${event} ${path.relative(folderPath, changedPath)}`); await autoCommit(folderPath, `[${event}] ${path.relative(folderPath, changedPath)}`);
// Repo-UI aktualisieren: // Repo-UI aktualisieren:
win.webContents.send('repo-updated', folderPath); win.webContents.send('repo-updated', folderPath);
}); });
@@ -147,7 +147,7 @@ function startMonitoringWatcher(folderPath, win) {
if (changes.length > 0) { if (changes.length > 0) {
// Commit-Message so bauen wie beim Event (eine Zeile pro Datei) // Commit-Message so bauen wie beim Event (eine Zeile pro Datei)
const msg = `[auto]` + changes.map(l => ` ${l}`).join('\n'); const msg = changes.map(l => ` ${l}`).join('\n');
const did = await autoCommit(folderPath, msg); const did = await autoCommit(folderPath, msg);
if (did) { if (did) {
win.webContents.send('repo-updated', folderPath); win.webContents.send('repo-updated', folderPath);