(projectCwd: string, modelId: string)
| 128 | } |
| 129 | |
| 130 | function commitCurrentBranch(projectCwd: string, modelId: string): void { |
| 131 | if (!hasUncommittedChanges(projectCwd)) return; |
| 132 | try { |
| 133 | execGit(projectCwd, 'add -A'); |
| 134 | execGit(projectCwd, `commit -m "Awel: ${modelId}" --allow-empty`); |
| 135 | } catch { |
| 136 | // Commit might fail if nothing to commit, that's ok |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | function getCurrentBranch(projectCwd: string): string { |
| 141 | return execGit(projectCwd, 'rev-parse --abbrev-ref HEAD'); |
no test coverage detected