Make externalRepoAuth check more consistent

This commit is contained in:
Michael B. Gale
2026-10-13 18:06:52 +01:00
parent 3ccff0b63b
commit f09e27bdf4
2 changed files with 4 additions and 2 deletions

2
lib/entry-points.js generated
View File

@@ -170758,7 +170758,7 @@ function makeProxyRequestOptions(dispatcher) {
};
}
function createApiClientWithDetails(apiDetails, { allowExternal = false, proxy = void 0 } = {}) {
const auth2 = allowExternal && apiDetails.externalRepoAuth || apiDetails.auth;
const auth2 = allowExternal && apiDetails.externalRepoAuth !== void 0 ? apiDetails.externalRepoAuth : apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry);
const requestOptions = makeProxyRequestOptions(proxy);
const opts = {

View File

@@ -131,7 +131,9 @@ function createApiClientWithDetails(
{ allowExternal = false, proxy = undefined }: CreateApiClientOptions = {},
): ApiClient {
const auth =
(allowExternal && apiDetails.externalRepoAuth) || apiDetails.auth;
allowExternal && apiDetails.externalRepoAuth !== undefined
? apiDetails.externalRepoAuth
: apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
const requestOptions = makeProxyRequestOptions(proxy);