Skip to content
Snippets Groups Projects
Commit 171cdf37 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: add option for unlimited pagination

Set env variable RENOVATE_PAGINATE_ALL to disable Renovate’s regular limiting of 1000 results (unlimited results will be returned).
parent 6b67ffa5
Branches
No related tags found
No related merge requests found
...@@ -37,7 +37,11 @@ async function get(path, opts, retries = 5) { ...@@ -37,7 +37,11 @@ async function get(path, opts, retries = 5) {
if (opts && opts.paginate) { if (opts && opts.paginate) {
// Check if result is paginated // Check if result is paginated
const linkHeader = parseLinkHeader(res.headers.link); const linkHeader = parseLinkHeader(res.headers.link);
if (linkHeader && linkHeader.next && linkHeader.next.page !== '11') { if (
linkHeader &&
linkHeader.next &&
(process.env.RENOVATE_PAGINATE_ALL || linkHeader.next.page !== '11')
) {
res.body = res.body.concat( res.body = res.body.concat(
(await get(linkHeader.next.url, opts, retries)).body (await get(linkHeader.next.url, opts, retries)).body
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment