Skip to content

Commit 2722aca

Browse files
author
Fred K. Schott
committed
index github api paging at 1, not 0
1 parent 54d79b9 commit 2722aca

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/github.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class GitHubConnection {
189189
const allRepos: GitHubRepoData[] = [];
190190
let pageRepos: GitHubRepoData[] = [];
191191
const pageSize = 50;
192-
let page = 0;
192+
let page = 1;
193193
let isOrg = true;
194194

195195
do {

src/test/_util/mock-api.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function setup() {
3535
nock('https://api.github.com')
3636
.persist()
3737
.get('/orgs/polymerelements/repos')
38-
.query({page: 0, per_page: 50, access_token: testApiToken})
38+
.query({page: 1, per_page: 50, access_token: testApiToken})
3939
.reply(
4040
200,
4141
[
@@ -63,6 +63,12 @@ export function setup() {
6363
],
6464
{Status: '200 OK'});
6565

66+
nock('https://api.github.com')
67+
.persist()
68+
.get('/orgs/polymerelements/repos')
69+
.query({page: 2, per_page: 50, access_token: testApiToken})
70+
.reply(200, [], {Status: '200 OK'});
71+
6672
nock('https://api.github.com')
6773
.persist()
6874
.get('/repos/PolymerElements/paper-appbar/git/refs/heads/ABCDEFGH')

0 commit comments

Comments
 (0)