From 4a44c3cfb1e7140c4e2ba02ff04d2ec3506477eb Mon Sep 17 00:00:00 2001 From: Ricard Bejarano <98832238+ribejara-te@users.noreply.github.com> Date: Thu, 22 May 2025 19:49:10 +0200 Subject: [PATCH] fix: Remove GitHub rate-limit client total sleep limit (#5591) Signed-off-by: Ricard Bejarano --- server/events/vcs/github_client.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/events/vcs/github_client.go b/server/events/vcs/github_client.go index 1bcb461b6..64073a9a9 100644 --- a/server/events/vcs/github_client.go +++ b/server/events/vcs/github_client.go @@ -125,11 +125,7 @@ func NewGithubClient(hostname string, credentials GithubCredentials, config Gith return nil, errors.Wrap(err, "error initializing github authentication transport") } - transportWithRateLimit, err := github_ratelimit.NewRateLimitWaiterClient( - transport.Transport, - github_ratelimit.WithTotalSleepLimit(time.Minute, func(callbackContext *github_ratelimit.CallbackContext) { - logger.Warn("github rate limit exceeded total sleep time, requests will fail to avoid penalties from github") - })) + transportWithRateLimit, err := github_ratelimit.NewRateLimitWaiterClient(transport.Transport) if err != nil { return nil, errors.Wrap(err, "error initializing github rate limit transport") }