(repo: string | undefined)
| 376 | } |
| 377 | |
| 378 | export function resolveKickoffRepoUrl(repo: string | undefined): string { |
| 379 | if (repo) return repo; |
| 380 | const originUrl = execFileSync( |
| 381 | "git", |
| 382 | ["config", "--get", "remote.origin.url"], |
| 383 | { |
| 384 | stdio: ["ignore", "pipe", "pipe"], |
| 385 | } |
| 386 | ) |
| 387 | .toString() |
| 388 | .trim(); |
| 389 | if (!originUrl) { |
| 390 | throw new Error("git remote.origin.url not set"); |
| 391 | } |
| 392 | return normalizeKickoffRepoUrl(originUrl); |
| 393 | } |
| 394 | |
| 395 | export function normalizeKickoffRepoUrl(url: string): string { |
| 396 | const trimmed = url.trim(); |
no test coverage detected