diff --git a/lib/platform/github/__snapshots__/index.spec.ts.snap b/lib/platform/github/__snapshots__/index.spec.ts.snap index 04620e028aa54393034ff24b4812a86fca34a9bd..41eee3b17cece0125ff47f026ba560a1ab179927 100644 --- a/lib/platform/github/__snapshots__/index.spec.ts.snap +++ b/lib/platform/github/__snapshots__/index.spec.ts.snap @@ -2461,7 +2461,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs", + "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs?per_page=100", }, ] `; @@ -2603,7 +2603,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs", + "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs?per_page=100", }, ] `; @@ -2665,7 +2665,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs", + "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs?per_page=100", }, ] `; @@ -2727,7 +2727,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs", + "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs?per_page=100", }, ] `; @@ -2789,7 +2789,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs", + "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs?per_page=100", }, ] `; @@ -2851,7 +2851,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs", + "url": "https://api.github.com/repos/some/repo/commits/somebranch/check-runs?per_page=100", }, ] `; diff --git a/lib/platform/github/index.spec.ts b/lib/platform/github/index.spec.ts index e3e4a95005260190b23d1f33af779d4f690975ba..2f35b846cc7adfe0294e05b7c9683a000ec5478c 100644 --- a/lib/platform/github/index.spec.ts +++ b/lib/platform/github/index.spec.ts @@ -595,7 +595,7 @@ describe('platform/github', () => { .reply(200, { state: 'success', }) - .get('/repos/some/repo/commits/somebranch/check-runs') + .get('/repos/some/repo/commits/somebranch/check-runs?per_page=100') .reply(200, []); await github.initRepo({ @@ -613,7 +613,7 @@ describe('platform/github', () => { .reply(200, { state: 'failure', }) - .get('/repos/some/repo/commits/somebranch/check-runs') + .get('/repos/some/repo/commits/somebranch/check-runs?per_page=100') .reply(200, []); await github.initRepo({ @@ -631,7 +631,7 @@ describe('platform/github', () => { .reply(200, { state: 'unknown', }) - .get('/repos/some/repo/commits/somebranch/check-runs') + .get('/repos/some/repo/commits/somebranch/check-runs?per_page=100') .reply(200, []); await github.initRepo({ repository: 'some/repo', @@ -649,7 +649,7 @@ describe('platform/github', () => { state: 'pending', statuses: [], }) - .get('/repos/some/repo/commits/somebranch/check-runs') + .get('/repos/some/repo/commits/somebranch/check-runs?per_page=100') .reply(200, { total_count: 2, check_runs: [ @@ -683,7 +683,7 @@ describe('platform/github', () => { state: 'pending', statuses: [], }) - .get('/repos/some/repo/commits/somebranch/check-runs') + .get('/repos/some/repo/commits/somebranch/check-runs?per_page=100') .reply(200, { total_count: 3, check_runs: [ @@ -723,7 +723,7 @@ describe('platform/github', () => { state: 'pending', statuses: [], }) - .get('/repos/some/repo/commits/somebranch/check-runs') + .get('/repos/some/repo/commits/somebranch/check-runs?per_page=100') .reply(200, { total_count: 2, check_runs: [ diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index d2f92be8a658aaa109129fef471ed03d2fd875bd..c4b742b2c868c5a10cce5e93e5b978b45553f3e8 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -837,11 +837,12 @@ export async function getBranchStatus( try { const checkRunsUrl = `repos/${config.repository}/commits/${escapeHash( branchName - )}/check-runs`; + )}/check-runs?per_page=100`; const opts = { headers: { accept: 'application/vnd.github.antiope-preview+json', }, + paginate: true, }; const checkRunsRaw = ( await githubApi.getJson<{