Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Listing issues only returns 30 results and there's no way to paginate #438

Closed
biddster opened this issue Apr 22, 2016 · 5 comments
Closed

Comments

@biddster
Copy link

biddster commented Apr 22, 2016

I'm trying to list all of the issues closed in a milestone:

gh is --list --state closed --milestone '1.1.0'

I know from GitHub web that there are 50 issues closed but I only get 30 on the command line from gh.

I can see that the repo command has the per_page setting as per the github api docs. Seems that hasn't been implemented here (or I've missed a command line switch, in which case, apologies).

What I'd really like for my automation purposes is to be able to retrieve the exhaustive issue list from GitHub via gh.

PS - great work, gh is brilliant.

@hildjj
Copy link

hildjj commented Oct 11, 2016

Same problem for gh re -l. There are several pages in the response. If you don't want to get one long page, you can use the Link header with rel next to follow the subsequent pages.

@henvic
Copy link
Member

henvic commented Oct 12, 2016

This is related to GitHub's rate limit:
https://developer.github.com/v3/rate_limit/

If someone can send a pull request I would really appreciate it and as long as it doesn't have any issues I am going to merge and release a new version right away, otherwise there isn't much I can't do for now. Sorry about that.

@timdp
Copy link

timdp commented Apr 18, 2017

Can you explain how this is related to rate limiting? It's just standard pagination. GitHub expects you to use the metadata supplied by the API to get all the pages using consecutive calls. You'll have to make a ton of calls before you hit the rate limit, and in that case, you can still implement a backoff mechanism as a fallback.

@Nowaker
Copy link

Nowaker commented Nov 1, 2017

This would be appreciated a lot.

@protoEvangelion
Copy link
Member

Should list the full amount of issues now.

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

No branches or pull requests

6 participants