-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Dev: Avoid GitHub API rate limits with basic auth #111
Comments
Is it possible to check whether we've hit the rate limit directly in the tests, and stop with a good error message? |
This is how I use GITHUB_TOKEN in gh-release-artifact: https://github.com/borkdude/gh-release-artifact/blob/cf082df46a648178d1904e9cbcb787d8136a35c6/src/borkdude/gh_release_artifact.clj#L19, if anyone wants to put together a PR. |
@borkdude: It seems like it could lead to confusion if we just start using whatever Otherwise if we do want people to be able to use their own What do you think? |
Sounds good! |
We merged @rads' proposed solution in #110. Though I don't think this behavior is documented anywhere. Cc @russmatney |
Indeed, it was helpful immediately to unblock my local testing! I added some thoughts on caching requests as a potential solution for local dev/testing (and faster neil performance) here: #127 (comment) i can port this over to a new discussion/issue if there's interest, feel free to ping me! |
Thanks for taking care of this! Since this issue is specific to the dev experience, this is now resolved from my point of view. If we want to expand the scope here to improve the experience for end users too, let’s create a new issue for that. |
Sounds good 👍 I'm happy with the current solution as-is. I suspect that for end users, many won't appreciate extra mandatory setup. |
Quick example for dev:
This would be the simplest solution to avoid the GitHub rate limits when running
bb tests
locally. Using basic auth raises the limit from 60 requests per hour to 5000.The rate limit seems to be a common pitfall for new contributors to this project so we may want to add something to the README as well. Maybe some better error handling for the rate-limiting HTTP response too.
If this is useful outside of dev we could add it as an command line argument, but I think the env variable would solve the immediate problem since hitting the rate limit is usually due to running
bb tests
. I don't think we should support passwords, only Personal Access Tokens.The text was updated successfully, but these errors were encountered: