Skip to content

Commit

Permalink
feat: break if no more contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Nov 14, 2023
1 parent b171984 commit fa73b13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/api/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export async function fetchRepo(repo: string, maxPages: number = 1) {
let page = 1
while (page <= maxPages) {
const usersPage = await fetchRepoOnePage(repo, page)
if (usersPage.length === 0) {
break
}
users.push(...usersPage)
page++
}
Expand Down

0 comments on commit fa73b13

Please sign in to comment.