From 49c0e6a2a1b058d47e79246cd66862fb65674d91 Mon Sep 17 00:00:00 2001 From: Sergei Zharinov <zharinov@users.noreply.github.com> Date: Mon, 19 Aug 2024 04:34:36 -0300 Subject: [PATCH] fix: Align cache decorator parameters (#30862) --- lib/modules/datasource/bitbucket-tags/index.ts | 7 +++++-- lib/modules/datasource/galaxy-collection/index.ts | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/modules/datasource/bitbucket-tags/index.ts b/lib/modules/datasource/bitbucket-tags/index.ts index 165336cce1..f8b59d2319 100644 --- a/lib/modules/datasource/bitbucket-tags/index.ts +++ b/lib/modules/datasource/bitbucket-tags/index.ts @@ -108,7 +108,7 @@ export class BitbucketTagsDatasource extends Datasource { BitbucketTagsDatasource.getCacheKey(registryUrl, repo, 'mainbranch'), ttlMinutes: 60, }) - async getMainBranch(repo: string): Promise<string> { + async getMainBranch(_registryUrl: string, repo: string): Promise<string> { return ( await this.bitbucketHttp.getJson(`/2.0/repositories/${repo}`, RepoInfo) ).body.mainbranch; @@ -129,7 +129,10 @@ export class BitbucketTagsDatasource extends Datasource { return this.getTagCommit(registryUrl, repo, newValue); } - const mainBranch = await this.getMainBranch(repo); + const mainBranch = await this.getMainBranch( + BitbucketTagsDatasource.getRegistryURL(registryUrl), + repo, + ); const url = `/2.0/repositories/${repo}/commits/${mainBranch}`; const bitbucketCommits = ( diff --git a/lib/modules/datasource/galaxy-collection/index.ts b/lib/modules/datasource/galaxy-collection/index.ts index ec109bc450..351814b843 100644 --- a/lib/modules/datasource/galaxy-collection/index.ts +++ b/lib/modules/datasource/galaxy-collection/index.ts @@ -120,7 +120,8 @@ export class GalaxyCollectionDatasource extends Datasource { @cache({ namespace: `datasource-${GalaxyCollectionDatasource.id}-detailed-version`, - key: (versionsUrl, basicRelease: Release) => basicRelease.version, + key: (_packageName: string, _versionsUrl: string, basicRelease: Release) => + basicRelease.version, ttlMinutes: 10080, // 1 week }) async getVersionDetails( -- GitLab