From 660e450e6d37fef5929d61b551307301e8f5887e Mon Sep 17 00:00:00 2001 From: oliverpool Date: Tue, 9 Apr 2024 11:58:44 +0200 Subject: [PATCH] webhook: fix admin-hooks new dropdowns (cherry picked from commit e0b5f2d59bd3b9ec3796c867982c07c76c4a4428) --- routers/web/admin/hooks.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/web/admin/hooks.go b/routers/web/admin/hooks.go index 8d59fbb858..91857d2753 100644 --- a/routers/web/admin/hooks.go +++ b/routers/web/admin/hooks.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/modules/optional" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/services/context" + webhook_service "code.gitea.io/gitea/services/webhook" ) const ( @@ -38,6 +39,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) { sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, optional.None[bool]()) sys["BaseLink"] = setting.AppSubURL + "/admin/hooks" sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks" + sys["WebhookList"] = webhook_service.List() if err != nil { ctx.ServerError("GetWebhooksAdmin", err) return @@ -48,6 +50,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) { def["Webhooks"], err = webhook.GetDefaultWebhooks(ctx) def["BaseLink"] = setting.AppSubURL + "/admin/hooks" def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks" + def["WebhookList"] = webhook_service.List() if err != nil { ctx.ServerError("GetWebhooksAdmin", err) return