MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getGithubRepo

Function getGithubRepo

source code/utils/git.ts:506–523  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Tested by

no test coverage detected