diff --git a/lib/modules/platform/bitbucket/comments.ts b/lib/modules/platform/bitbucket/comments.ts index 6aefe689edf3c5..106a638971530b 100644 --- a/lib/modules/platform/bitbucket/comments.ts +++ b/lib/modules/platform/bitbucket/comments.ts @@ -1,8 +1,7 @@ import { logger } from '../../../logger'; import { BitbucketHttp } from '../../../util/http/bitbucket'; import type { EnsureCommentConfig, EnsureCommentRemovalConfig } from '../types'; -import type { Config } from './types'; -import { accumulateValues } from './utils'; +import type { Config, PagedResult } from './types'; const bitbucketHttp = new BitbucketHttp(); @@ -21,9 +20,14 @@ async function getComments( config: CommentsConfig, prNo: number ): Promise { - const comments = await accumulateValues( - `/2.0/repositories/${config.repository}/pullrequests/${prNo}/comments` - ); + const comments = ( + await bitbucketHttp.getJson>( + `/2.0/repositories/${config.repository}/pullrequests/${prNo}/comments`, + { + paginate: true, + } + ) + ).body.values; logger.debug(`Found ${comments.length} comments`); return comments;