()
| 28 | const root = readRepoRoot(); |
| 29 | return { root, originUrl: readOriginUrl(root), headRef: readHeadRef(root) }; |
| 30 | } |
| 31 | |
| 32 | export function readRepoRoot(): string { |
| 33 | try { |
| 34 | return execFileSync("git", ["rev-parse", "--show-toplevel"], { |
| 35 | encoding: "utf8", |
| 36 | stdio: ["ignore", "pipe", "ignore"], |
| 37 | }).trim(); |
| 38 | } catch { |
| 39 | throw new NotInGitRepoError(); |
| 40 | } |
| 41 | } |
| 42 |
no outgoing calls
no test coverage detected