diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js index 307dc0a5090e1925eee3179a72fa0f601be30e7b..b628009ab70105ffe0b5bc17d2b468a06561ea3d 100644 --- a/lib/platform/github/gh-got-wrapper.js +++ b/lib/platform/github/gh-got-wrapper.js @@ -32,11 +32,12 @@ async function get(path, opts, retries = 5) { const res = await ghGot(path, opts); if (opts.paginate) { // Check if result is paginated + const pageLimit = opts.pageLimit || 10; const linkHeader = parseLinkHeader(res.headers.link); if (linkHeader && linkHeader.next && linkHeader.last) { let lastPage = +linkHeader.last.page; if (!process.env.RENOVATE_PAGINATE_ALL) { - lastPage = Math.min(10, lastPage); + lastPage = Math.min(pageLimit, lastPage); } const pageNumbers = Array.from( new Array(lastPage),