remove util.OptionalBool and related functions (#29513)

and migrate affected code

_last refactoring bits to replace **util.OptionalBool** with
**optional.Option[bool]**_
This commit is contained in:
6543 2024-03-02 16:42:31 +01:00 committed by GitHub
parent 3f081d4b54
commit a3f05d0d98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
71 changed files with 308 additions and 355 deletions

View file

@ -8,8 +8,8 @@ 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/modules/util"
"code.gitea.io/gitea/services/context"
)
@ -35,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, util.OptionalBoolNone)
sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, optional.None[bool]())
sys["BaseLink"] = setting.AppSubURL + "/admin/hooks"
sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks"
if err != nil {