github-dashing icon indicating copy to clipboard operation
github-dashing copied to clipboard

GitHub API only returns 30 results on subsequent requests

Open monfresh opened this issue 10 years ago • 2 comments

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.

monfresh avatar Aug 06 '15 14:08 monfresh

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 (https://github.com/octokit/octokit.rb/issues/554), but since I'm setting Octokit.auto_paginate = true very early (in config.ru), I don't think that applies here.

chillu avatar Oct 18 '15 04:10 chillu

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

rajchandra3 avatar Apr 07 '18 10:04 rajchandra3