From 550ab80477d8aeb17fc0df1af6317a328ac4658e Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 22 May 2023 01:54:25 -0400 Subject: [PATCH] refactor(bitbucket): use paginated api for tags (#22336) --- lib/modules/datasource/bitbucket-tags/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/modules/datasource/bitbucket-tags/index.ts b/lib/modules/datasource/bitbucket-tags/index.ts index 10407dce691651..b6e98189539358 100644 --- a/lib/modules/datasource/bitbucket-tags/index.ts +++ b/lib/modules/datasource/bitbucket-tags/index.ts @@ -2,7 +2,6 @@ import { cache } from '../../../util/cache/package/decorator'; import { BitbucketHttp } from '../../../util/http/bitbucket'; import { ensureTrailingSlash } from '../../../util/url'; import type { PagedResult, RepoInfoBody } from '../../platform/bitbucket/types'; -import * as utils from '../../platform/bitbucket/utils'; import { Datasource } from '../datasource'; import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types'; import type { BitbucketCommit, BitbucketTag } from './types'; @@ -56,7 +55,11 @@ export class BitbucketTagsDatasource extends Datasource { packageName: repo, }: GetReleasesConfig): Promise { const url = `/2.0/repositories/${repo}/refs/tags`; - const bitbucketTags = await utils.accumulateValues(url); + const bitbucketTags = ( + await this.bitbucketHttp.getJson>(url, { + paginate: true, + }) + ).body.values; const dependency: ReleaseResult = { sourceUrl: BitbucketTagsDatasource.getSourceUrl(repo, registryUrl),