(repoPath: string, message: string)
| 147 | } |
| 148 | |
| 149 | export function commitAll(repoPath: string, message: string) { |
| 150 | try { |
| 151 | untrackIgnoredPaths(repoPath); |
| 152 | runGit(['add', '-A'], repoPath); |
| 153 | runGit(['commit', '-m', message], repoPath); |
| 154 | return true; |
| 155 | } catch (error) { |
| 156 | if (error instanceof GitError && error.output && error.output.includes('nothing to commit')) { |
| 157 | return false; |
| 158 | } |
| 159 | throw error; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | export function pushToRemote(repoPath: string, remoteName = 'origin', branch = 'main') { |
| 164 | try { |
no test coverage detected