Octokit v22 uses native fetch, which has no built-in timeout, so a stuck GitHub request hung until the PR-status route's 12s overall budget fired — and one slow request could consume the entire budget. Wrap fetch with an 8s AbortSignal.timeout via a shared createOctokit() factory, and route the inline Octokit instantiations through it too.
31 lines
526 B
JavaScript
31 lines
526 B
JavaScript
export {
|
|
getGitHubAuth,
|
|
getGitHubAuthAccounts,
|
|
setGitHubAuth,
|
|
activateGitHubAuth,
|
|
clearGitHubAuth,
|
|
getGitHubClientId,
|
|
getGitHubScopes,
|
|
GH_CLI_ACCOUNT_ID,
|
|
isGhCliDisabled,
|
|
isGhCliActive,
|
|
setGhCliActive,
|
|
setGhCliDisabled,
|
|
GITHUB_AUTH_FILE,
|
|
} from './auth.js';
|
|
|
|
export {
|
|
startDeviceFlow,
|
|
exchangeDeviceCode,
|
|
} from './device-flow.js';
|
|
|
|
export {
|
|
getOctokitOrNull,
|
|
createOctokit,
|
|
} from './octokit.js';
|
|
|
|
export {
|
|
parseGitHubRemoteUrl,
|
|
resolveGitHubRepoFromDirectory,
|
|
} from './repo/index.js';
|