-
Notifications
You must be signed in to change notification settings - Fork 121
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
Handle rate limiting gracefully #34
Comments
Found this in the docs about rate limits:
|
Also, not sure how much users will give GitHub credentials to avoid these limits. So not sure if it is worth adding an authentication functionality just for this? Otherwise I would like to give it a shot, found this article about a CLI application getting and storing a OAuth token etc. |
I believe it's 5k/hour or so – I have experience with this from building out NodeKitten. |
For implementation of this, I believe we can just accept an object and pass it directly to @octokit/rest.js, which is the lib we're using for GitHub. See the Authentication examples in their README.md for an example – in NodeKitten I used token authentication but we could just let the user decide how they want to authenticate by passing an object as @octokit/rest.js would expect. |
Oops didn't mean to close 😁 |
if the rate is 5K ☘️ I don't think we/any user at any point exceed this rate |
I think the search that we use is limited at a lower rate than normal requests. Have tried it out, and can hit the limit if i make a dozen requests in a minute. |
If we don't store the authentication in a way, the user will have to login/authenticate each time we run? Don't think that is a fun UX if we ask that every time. |
@kennethvandenberghe so this is more for when the user IMO it's less needed on the CLI since I can't really think of a use case in which a user (not a contributor) is genuinely using the CLI to find a Good First Issue. That said, we may want to add the ability for contributors to add a file locally like |
|
So to conclude stuff here so i can start fixing this stuff finally, what is the goal specifically @bnb? |
@kennethvandenberghe enable the user to pass an object to the module when calling it that we will pass directly to We don't need to be specific about what that object looks like, since Here's the examples from the |
When testing to make sure nothing breaks, I semi-often get rate-limited by GitHub. This is because there are (IIRC) 50 queries accepted before 1-hour rate limiting kicks in.
Obviously this shouldn't be happening for a normal user (though I'd applaud a user that was working on dozens of good-first-issues), but it may happen for contributors.
Checklist:
The text was updated successfully, but these errors were encountered: