Skip to content

Commit 729fa06

Browse files
6543lafriks
andauthored
migration: github: if rate limit is not enabled, ignore it (#15490) (#15495)
Co-authored-by: Lauris BH <[email protected]>
1 parent b228a0a commit 729fa06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/migrations/github.go

+5
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)