kevincobain2000 / gobrew

Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.
https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6
MIT License
364 stars 24 forks source link

Github rate limits #129

Closed juev closed 12 months ago

juev commented 12 months ago

After the update, we encountered a problem with the limit on the number of requests from github: 122

=== RUN   TestUpgrade
Error: ror]: json: cannot unmarshal object into Go value of type []gobrew.Tag
FAIL    github.com/kevincobain2000/gobrew   49.152s

It is necessary to add a check to the response code from github and display either information about limiting requests or an error text in order to understand what the problem was.

We also need to add a github token to the request to raise the limits several times.

kevincobain2000 commented 12 months ago

Or we can comment out that test. Just that test is troublesome. Rest everything is ratelimit proof.

juev commented 12 months ago

Gobrew is also used in github actions, where the problem with rate limits occurs. There is always a token in github actions that we can use in requests to the api. This will solve this problem with little cost.

In addition, we need to correctly process response codes from github. I will try to provide changes to this issue in the near future.