aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migrations
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-04-15 15:34:22 +0200
committerGitHub <noreply@github.com>2021-04-15 15:34:22 +0200
commit2a42d80d14e97fe962658bbcb3d2341571f2afcf (patch)
treea305e348af28e7f1a74850dcb6b70778f7521661 /modules/migrations
parent217b5c150f85b5dc1786383ae99a07dab45a6c97 (diff)
downloadgitea-2a42d80d14e97fe962658bbcb3d2341571f2afcf.tar.gz
gitea-2a42d80d14e97fe962658bbcb3d2341571f2afcf.zip
migration: github: if rate limit is not enabled, ignore it (#15490)
Diffstat (limited to 'modules/migrations')
-rw-r--r--modules/migrations/github.go5
1 files changed, 5 insertions, 0 deletions
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
}