Add RateLimit() function to gh client

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2025-04-28 13:37:33 +00:00
parent fafe98e62f
commit 73340da322
5 changed files with 54 additions and 29 deletions

View file

@ -99,8 +99,8 @@ func getGhOrgWebhook(url, ghToken, orgName string) (*github.Hook, error) {
}
for _, hook := range ghOrgHooks {
hookURL, ok := hook.Config["url"].(string)
if ok && hookURL == url {
hookURL := hook.Config.GetURL()
if hookURL == url {
return hook, nil
}
}

View file

@ -109,8 +109,8 @@ func getGhRepoWebhook(url, ghToken, orgName, repoName string) (*github.Hook, err
}
for _, hook := range ghRepoHooks {
hookURL, ok := hook.Config["url"].(string)
if ok && hookURL == url {
hookURL := hook.Config.GetURL()
if hookURL == url {
return hook, nil
}
}