MCPcopy
hub / github.com/codeaashu/claude-code / detectCurrentRepository

Function detectCurrentRepository

src/utils/detectRepository.ts:17–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17export 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"

Callers 4

ResumeTaskFunction · 0.85
checkHasGitRemoteFunction · 0.85
init.tsFile · 0.85

Calls 1

Tested by

no test coverage detected