gh-search-cli
gh-search-cli copied to clipboard
Rate limit requests
Motivation
Requests that return more than about 100 records fail because of rate limiting by github; in my case I am expecting about 300 lines, which is not a huge amount and not abusive or unreasonable, but it fails because the pagination calls are rate limited.
Proposal
Add an command line flag giving a pause to make before successive API calls, or rate limit automatically, e.g. by waiting a minute or two and then retrying after a failed call.
I see that you already back off in base-commands.ts. Maybe there just needs to be a longer backoff, or a way for the user to extend the backoff. A very naive solution:
< + 100
> + process.env.QUERY_INTERVAL || 100