MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / resolveGhAuthToken

Function resolveGhAuthToken

src/utils/github/ghAuthToken.ts:23–37  ·  view source on GitHub ↗
(provider: GitHubTokenProvider)

Source from the content-addressed store, hash-verified

21}
22
23function resolveGhAuthToken(provider: GitHubTokenProvider): string | undefined {
24 const envToken = getEnvToken([
25 ...providerEnvNames[provider],
26 'GH_TOKEN',
27 'GITHUB_TOKEN',
28 ])
29 if (envToken) {
30 return envToken
31 }
32
33 return execSyncWithDefaults_DEPRECATED('gh auth token', {
34 timeout: 5000,
35 stdio: ['ignore', 'pipe', 'ignore'],
36 }) ?? undefined
37}
38
39export function getGitHubAuthToken(
40 provider: GitHubTokenProvider,

Callers 1

getGitHubAuthTokenFunction · 0.85

Calls 2

getEnvTokenFunction · 0.85

Tested by

no test coverage detected