Skip to content
Snippets Groups Projects
Unverified Commit 5597560c authored by Adam Setch's avatar Adam Setch Committed by GitHub
Browse files

refactor(bitbucket): use paginated api for pullrequests (#22330)

parent 550ab804
No related branches found
No related tags found
No related merge requests found
...@@ -279,7 +279,12 @@ export async function getPrList(): Promise<Pr[]> { ...@@ -279,7 +279,12 @@ export async function getPrList(): Promise<Pr[]> {
if (renovateUserUuid && !config.ignorePrAuthor) { if (renovateUserUuid && !config.ignorePrAuthor) {
url += `&q=author.uuid="${renovateUserUuid}"`; url += `&q=author.uuid="${renovateUserUuid}"`;
} }
const prs = await utils.accumulateValues(url, undefined, undefined, 50); const prs = (
await bitbucketHttp.getJson<PagedResult<PrResponse>>(url, {
paginate: true,
pagelen: 50,
})
).body.values;
config.prList = prs.map(utils.prInfo); config.prList = prs.map(utils.prInfo);
logger.debug(`Retrieved Pull Requests, count: ${config.prList.length}`); logger.debug(`Retrieved Pull Requests, count: ${config.prList.length}`);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment