Browse Source

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

tags/v1.15.0-rc1
6543 3 years ago
parent
commit
2a42d80d14
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      modules/migrations/github.go

+ 5
- 0
modules/migrations/github.go View File

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



Loading…
Cancel
Save