From 9fb2fa5f460cbdf6af333c849ec85eb0c87458b9 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 25 Sep 2026 15:02:13 +0100 Subject: [PATCH] Avoid duplicate `getApiDetails` in `getGitHubVersion` --- lib/entry-points.js | 5 +++-- src/api-client.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 0b9e64fa3..a165a9b3b 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -146768,9 +146768,10 @@ async function getGitHubVersionFromApi(apiClient, apiDetails) { } async function getGitHubVersion() { if (cachedGitHubVersion === void 0) { + const apiDetails = getApiDetails(); cachedGitHubVersion = await getGitHubVersionFromApi( - getApiClient(), - getApiDetails() + createApiClientWithDetails(apiDetails), + apiDetails ); } return cachedGitHubVersion; diff --git a/src/api-client.ts b/src/api-client.ts index bc6018877..e509f5eea 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -249,9 +249,10 @@ export async function getGitHubVersionFromApi( */ export async function getGitHubVersion(): Promise { if (cachedGitHubVersion === undefined) { + const apiDetails = getApiDetails(); cachedGitHubVersion = await getGitHubVersionFromApi( - getApiClient(), - getApiDetails(), + createApiClientWithDetails(apiDetails), + apiDetails, ); } return cachedGitHubVersion;