MCPcopy Create free account
hub / github.com/Noumena-Network/code / getGithubRepo

Function getGithubRepo

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

Source from the content-addressed store, hash-verified

517}
518
519export async function getGithubRepo(): Promise<string | null> {
520 const { parseGitRemote } = await import('./detectRepository.js')
521 const remoteUrl = await getRemoteUrl()
522 if (!remoteUrl) {
523 logForDebugging('Local GitHub repo: unknown')
524 return null
525 }
526 // Only return results for github.com — callers (e.g. issue submission)
527 // assume the result is a github.com repository.
528 const parsed = parseGitRemote(remoteUrl)
529 if (parsed && parsed.host === 'github.com') {
530 const result = `${parsed.owner}/${parsed.name}`
531 logForDebugging(`Local GitHub repo: ${result}`)
532 return result
533 }
534 logForDebugging('Local GitHub repo: unknown')
535 return null
536}
537
538/**
539 * 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