()
| 15 | } |
| 16 | |
| 17 | export async function detectCurrentRepository(): Promise<string | null> { |
| 18 | const result = await detectCurrentRepositoryWithHost() |
| 19 | if (!result) return null |
| 20 | // Only return results for github.com to avoid breaking downstream consumers |
| 21 | // that assume the result is a github.com repository. |
| 22 | // Use detectCurrentRepositoryWithHost() for GHE support. |
| 23 | if (result.host !== 'github.com') return null |
| 24 | return `${result.owner}/${result.name}` |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Like detectCurrentRepository, but also returns the host (e.g. "github.com" |
no test coverage detected