From 48d4cf3e18541b4dcbebe782405f68b4dd055c7b Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 22 May 2023 03:33:12 -0400 Subject: [PATCH] refactor(bitbucket): use paginated api for commit statuses (#22329) --- lib/modules/platform/bitbucket/index.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/modules/platform/bitbucket/index.ts b/lib/modules/platform/bitbucket/index.ts index 1f52707e65bc85..b36808e4e5021d 100644 --- a/lib/modules/platform/bitbucket/index.ts +++ b/lib/modules/platform/bitbucket/index.ts @@ -375,13 +375,15 @@ async function getStatus( memCache = true ): Promise { const sha = await getBranchCommit(branchName); - return utils.accumulateValues( - // TODO: types (#7154) - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - `/2.0/repositories/${config.repository}/commit/${sha}/statuses`, - 'get', - { memCache } - ); + return ( + await bitbucketHttp.getJson>( + `/2.0/repositories/${config.repository}/commit/${sha!}/statuses`, + { + paginate: true, + memCache, + } + ) + ).body.values; } // Returns the combined status for a branch. export async function getBranchStatus(