From 30bf602c7785d3cc61b467c338214aa069903c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= Date: Thu, 20 Feb 2025 13:50:11 +0100 Subject: [PATCH] [Provisioning] Fix webhook and finalizer issues (#101052) Fix webhook and finalizer issue The maximum number of webhooks per repository is 20 --- pkg/registry/apis/provisioning/repository/github/impl.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/registry/apis/provisioning/repository/github/impl.go b/pkg/registry/apis/provisioning/repository/github/impl.go index f540c396652..e8a5901f995 100644 --- a/pkg/registry/apis/provisioning/repository/github/impl.go +++ b/pkg/registry/apis/provisioning/repository/github/impl.go @@ -439,6 +439,9 @@ func (r *githubClient) CreateWebhook(ctx context.Context, owner, repository stri if errors.As(err, &ghErr) && ghErr.Response.StatusCode == http.StatusServiceUnavailable { return WebhookConfig{}, ErrServiceUnavailable } + if err != nil { + return WebhookConfig{}, err + } return WebhookConfig{ ID: createdHook.GetID(),