From 2a42d80d14e97fe962658bbcb3d2341571f2afcf Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 15 Apr 2021 15:34:22 +0200 Subject: [PATCH] migration: github: if rate limit is not enabled, ignore it (#15490) --- modules/migrations/github.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/migrations/github.go b/modules/migrations/github.go index cb61086b2a..282e3b4786 100644 --- a/modules/migrations/github.go +++ b/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 }