From 340977de5e4dab1b1775ccc62187d34f7356ef8c Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Tue, 19 May 2026 13:41:49 +0100 Subject: [PATCH] feat(catalog-backend-module-github): rename options_ to wrappedOptions Signed-off-by: MT Lewis --- .../src/lib/github.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/catalog-backend-module-github/src/lib/github.ts b/plugins/catalog-backend-module-github/src/lib/github.ts index a63f91f9b9..d7a0543d00 100644 --- a/plugins/catalog-backend-module-github/src/lib/github.ts +++ b/plugins/catalog-backend-module-github/src/lib/github.ts @@ -1047,23 +1047,24 @@ function installConditionalRequestCache( octokit: Octokit, cache: CacheService, ): void { - octokit.hook.wrap('request', async (request, options_) => { - const resolvedUrl = (options_.url || '').replace(/\{([^}]+)\}/g, (_, key) => - encodeURIComponent((options_ as any)[key]), + octokit.hook.wrap('request', async (request, wrappedOptions) => { + const resolvedUrl = (wrappedOptions.url || '').replace( + /\{([^}]+)\}/g, + (_, key) => encodeURIComponent((wrappedOptions as any)[key]), ); - const cacheKey = `catalog-backend-module-github:${options_.method}:${options_.baseUrl}${resolvedUrl}`; + const cacheKey = `catalog-backend-module-github:${wrappedOptions.method}:${wrappedOptions.baseUrl}${resolvedUrl}`; const cached = await cache .get(cacheKey) .catch(() => undefined); if (cached?.lastModified) { - options_.headers['if-modified-since'] = cached.lastModified; + wrappedOptions.headers['if-modified-since'] = cached.lastModified; } else if (cached?.etag) { - options_.headers['if-none-match'] = cached.etag; + wrappedOptions.headers['if-none-match'] = cached.etag; } try { - const response = await request(options_); + const response = await request(wrappedOptions); const lastModified = response.headers['last-modified']; const etag = response.headers.etag;