Browse Source

migration: github: if rate limit is not enabled, ignore it (#15490) (#15495)

Co-authored-by: Lauris BH <lauris@nix.lv>
mj-v1.14.3
6543 1 year ago
committed by GitHub
parent
commit
729fa06468
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      modules/migrations/github.go

5
modules/migrations/github.go

@ -132,6 +132,11 @@ func (g *GithubDownloaderV3) sleep() {
func (g *GithubDownloaderV3) RefreshRate() error {
rates, _, err := g.client.RateLimits(g.ctx)
if err != nil {
// if rate limit is not enabled, ignore it
if strings.Contains(err.Error(), "404") {
g.rate = nil
return nil
}
return err
}

Loading…
Cancel
Save