Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit #13

Open
Chandler-Song opened this issue Jan 17, 2019 · 1 comment
Open

Limit #13

Chandler-Song opened this issue Jan 17, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Chandler-Song
Copy link

image
If the repos' contributor is over 100, the max is 100. Can I unlock this limit and get over 100 contributors?

@s0md3v s0md3v added the enhancement New feature or request label Jan 17, 2019
@whoot
Copy link

whoot commented Jan 31, 2020

This is because the script does something like this:

get('https://api.github.com/repos/%s/%s/contributors?per_page=100' ...

The API supports pages (see https://developer.github.com/v3/#pagination) so what you need to do is:

  1. request 100 results with page=1
    https://api.github.com/orgs/%s/members?per_page=100&page=1
  2. request 100 results with page=2
    https://api.github.com/orgs/%s/members?per_page=100&page=2

increment page until the results are lower than 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants