Skip to content

Commit 2a42d80

Browse files
authored
migration: github: if rate limit is not enabled, ignore it (#15490)
1 parent 217b5c1 commit 2a42d80

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/migrations/github.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ func (g *GithubDownloaderV3) sleep() {
132132
func (g *GithubDownloaderV3) RefreshRate() error {
133133
rates, _, err := g.client.RateLimits(g.ctx)
134134
if err != nil {
135+
// if rate limit is not enabled, ignore it
136+
if strings.Contains(err.Error(), "404") {
137+
g.rate = nil
138+
return nil
139+
}
135140
return err
136141
}
137142

0 commit comments

Comments
 (0)