MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / getGithubRepo

Function getGithubRepo

src/utils/git.ts:504–521  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

502}
503
504export async function getGithubRepo(): Promise<string | null> {
505 const { parseGitRemote } = await import('./detectRepository.js')
506 const remoteUrl = await getRemoteUrl()
507 if (!remoteUrl) {
508 logForDebugging('Local GitHub repo: unknown')
509 return null
510 }
511 // Only return results for github.com — callers (e.g. issue submission)
512 // assume the result is a github.com repository.
513 const parsed = parseGitRemote(remoteUrl)
514 if (parsed && parsed.host === 'github.com') {
515 const result = `${parsed.owner}/${parsed.name}`
516 logForDebugging(`Local GitHub repo: ${result}`)
517 return result
518 }
519 logForDebugging('Local GitHub repo: unknown')
520 return null
521}
522
523/**
524 * Preserved git state for issue submission.

Callers 4

InstallGitHubAppFunction · 0.85
startTeamMemoryWatcherFunction · 0.85
pullTeamMemoryFunction · 0.85
pushTeamMemoryFunction · 0.85

Calls 3

getRemoteUrlFunction · 0.85
parseGitRemoteFunction · 0.85
logForDebuggingFunction · 0.70

Tested by

no test coverage detected