Skip to content
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

GitHub API rate limit exceeded for xxx #121

Closed
jakebolam opened this issue Dec 23, 2018 · 3 comments · Fixed by #123
Closed

GitHub API rate limit exceeded for xxx #121

jakebolam opened this issue Dec 23, 2018 · 3 comments · Fixed by #123

Comments

@jakebolam
Copy link
Collaborator

  • all-contributors-cli version: 5.4.1
  • node version: v8.11.3
  • npm (or yarn) version: yarn: 1.7.0

Relevant code or config:
n/a

What you did:
Ran yarn all-contributors check

What happened:
Crashed:
screen shot 2018-12-23 at 10 48 42 am

Reproduction repository:
Run commands which call the github API for 50+ times in more than an hour (note this is not limited to all-contributors/or your comupter, other programs on your machine and network contribute to this 50 limit for unauthenticated requests:
https://developer.github.com/v3/rate_limit/

Problem description:
API limit hit for all contributors

yarn all-contributors check
yarn run v1.7.0
$ /code/codewatch/node_modules/.bin/all-contributors check
API rate limit exceeded for xxx.xx.xx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Suggested solution:
A way to provide a GITHUB_AUTH_TOKEN env var which is attached to github requests to avoid api limits.

@jakebolam jakebolam changed the title API rate limit exceeded for xxx GitHub API rate limit exceeded for xxx Dec 23, 2018
@jakebolam
Copy link
Collaborator Author

I put together an example of the changes required: #122

@jakebolam
Copy link
Collaborator Author

FYI This is cropping up on a number of projects. It also appears to be affecting all-contributors-cli, when a contributor was trying to add himself here: #97

kentcdodds pushed a commit that referenced this issue Dec 23, 2018
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!

Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).

Also, please make sure you're familiar with and follow the instructions in the
contributing guidelines (found in the CONTRIBUTING.md file).

If you're new to contributing to open source projects, you might find this free
video course helpful: http://kcd.im/pull-request

Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->
**What**:
Add a way to avoid GITHUB API LIMIT by supplying an optional GITHUB_AUTH token to increase github rate limiting from 50 requests to 5000 (and limited by user, not IP)

<!-- Why are these changes necessary? -->
**Why**:
To address: #121 

<!-- How were these changes implemented? -->
**How**:
By Me

<!-- Have you done all of these things?  -->
**Checklist**:
<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->
- [ ] Documentation
- [ ] Tests
- [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
- [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->

<!-- feel free to add additional comments -->
Berkmann18 pushed a commit that referenced this issue May 24, 2020
* fix: turn off Analytics in a local or test environment

* lint

* Tweak

* Tweak
@klieret
Copy link

klieret commented Jul 20, 2022

I still run into this with the latest version of the cli, so I do not believe this has been fully fixed.
EDIT: It took me a while to realize that you added documentation of how to circumvent this at https://allcontributors.org/docs/en/cli/usage#github-users
Thanks & sorry for the noise!

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

Successfully merging a pull request may close this issue.

2 participants