()
| 8 | } |
| 9 | |
| 10 | export async function getRepoName(): Promise<string> { |
| 11 | const remote = await git.remote(["get-url", "origin"]).catch(() => null); |
| 12 | if (remote) { |
| 13 | const name = remote.trim().split("/").pop()?.replace(".git", "") || "unknown"; |
| 14 | return name; |
| 15 | } |
| 16 | const root = await git.revparse(["--show-toplevel"]); |
| 17 | return root.trim().split("/").pop() || "unknown"; |
| 18 | } |
| 19 | |
| 20 | export async function getChangedFiles(): Promise<string[]> { |
| 21 | const status = await git.status(); |
no outgoing calls
no test coverage detected