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

GitHub API only returns 30 results on subsequent requests #29

Open
monfresh opened this issue Aug 6, 2015 · 2 comments
Open

GitHub API only returns 30 results on subsequent requests #29

monfresh opened this issue Aug 6, 2015 · 2 comments

Comments

@monfresh
Copy link

monfresh commented Aug 6, 2015

When you first run the app, you'll see that the number of repositories being inspected is the correct total number of repositories for the organization. However, the next time the job runs, only 30 repositories are returned.

This is either due to the request method resetting the Octokit client, or not passing in the autopaginate option during initialization.

@chillu
Copy link
Owner

chillu commented Oct 18, 2015

Hi there, sorry for the late reply. Can you check in the terminal logs which API calls are made for a subsequent fetch? Look for https://api.github.com/orgs/<your-repo>/repos?per_page=100&type=owner. Looking at the Octokit source, it should copy the "static" module defaults (https://github.com/octokit/octokit.rb/blob/master/lib/octokit/client.rb#L101). There's an issue around those defaults not impacting current instances (octokit/octokit.rb#554), but since I'm setting Octokit.auto_paginate = true very early (in config.ru), I don't think that applies here.

@rajchandra3
Copy link

try https://api.github.com/orgs/<your-repo>/repos?per_page=100&type=owner works for me.

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

No branches or pull requests

3 participants