Skip to content

Commit adc1d5c

Browse files
authored
Merge pull request #100 from ConductorOne/jallers/tweak-ratelimit
Only apply ratelimit check to 403 or 429 again
2 parents 1b169d1 + b7ed582 commit adc1d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/connector/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func isRatelimited(resp *github.Response) bool {
230230
if resp == nil {
231231
return false
232232
}
233-
if resp.Header.Get("X-Ratelimit-Remaining") == "0" {
233+
if resp.StatusCode == http.StatusForbidden && resp.Header.Get("X-Ratelimit-Remaining") == "0" {
234234
return true
235235
}
236236
return resp.StatusCode == http.StatusTooManyRequests

0 commit comments

Comments
 (0)