From f09e27bdf46cb84c1478ad577875cf5a13b0fcef Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 13 Oct 2026 18:06:52 +0100 Subject: [PATCH] Make `externalRepoAuth` check more consistent --- lib/entry-points.js | 2 +- src/api-client.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 57dd02541..ebe7f9d17 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -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 = { diff --git a/src/api-client.ts b/src/api-client.ts index 48313dbba..31169480a 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -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);