mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-17 11:57:12 +03:00
Fix rate limit.
This commit is contained in:
parent
49eeef3260
commit
bdb1aba90e
@ -6,10 +6,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
AllChecks = append(AllChecks, checker.NamedCheck{
|
||||
Name: "PullRequests",
|
||||
Fn: PullRequests,
|
||||
})
|
||||
registerCheck("PullRequests", PullRequests)
|
||||
}
|
||||
|
||||
func PullRequests(c checker.Checker) checker.CheckResult {
|
||||
|
@ -73,7 +73,7 @@ func (gh *RateLimitRoundTripper) RoundTrip(r *http.Request) (*http.Response, err
|
||||
}
|
||||
|
||||
duration := time.Until(time.Unix(int64(reset), 0))
|
||||
gh.Logger.Debugf("Rate limit exceeded. Waiting %s to retry...", duration)
|
||||
gh.Logger.Warnf("Rate limit exceeded. Waiting %s to retry...", duration)
|
||||
|
||||
// Retry
|
||||
time.Sleep(duration)
|
||||
|
Loading…
Reference in New Issue
Block a user