1
0
Fork 0
forked from forgejo/forgejo

webhook: add admin-hooks tests

(cherry picked from commit 9a94019db4)
This commit is contained in:
oliverpool 2024-04-09 11:59:10 +02:00 committed by GitHub
parent 660e450e6d
commit 01dc275a19
5 changed files with 40 additions and 20 deletions

View file

@ -8,7 +8,6 @@ import (
"code.gitea.io/gitea/models/webhook"
"code.gitea.io/gitea/modules/base"
"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"
@ -36,7 +35,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) {
sys["Title"] = ctx.Tr("admin.systemhooks")
sys["Description"] = ctx.Tr("admin.systemhooks.desc")
sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, optional.None[bool]())
sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, false)
sys["BaseLink"] = setting.AppSubURL + "/admin/hooks"
sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks"
sys["WebhookList"] = webhook_service.List()