(workDir: string)
| 144 | } |
| 145 | |
| 146 | function detectGitRepo(workDir: string): boolean { |
| 147 | try { |
| 148 | const result = spawnSync('git', ['-C', workDir, 'rev-parse', '--is-inside-work-tree'], { |
| 149 | encoding: 'utf8', |
| 150 | timeout: SPAWN_TIMEOUT_MS, |
| 151 | }); |
| 152 | return result.status === 0 && result.stdout.trim() === 'true'; |
| 153 | } catch { |
| 154 | return false; |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | function readBranch(workDir: string): string | null { |
| 159 | try { |
no outgoing calls
no test coverage detected