1
0
Fork 0
forked from forgejo/forgejo

Start to migrate from util.OptionalBool to optional.Option[bool] (#29329)

just create transition helper and migrate two structs

(cherry picked from commit 7fbdb60fc1152acc9a040dc04b1b0f5a3475b081)
This commit is contained in:
6543 2024-02-23 03:18:33 +01:00 committed by Earl Warren
parent 4b494d341f
commit 8ff858b94b
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
24 changed files with 84 additions and 64 deletions

View file

@ -8,7 +8,7 @@ import (
"sort"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/optional"
"github.com/gobwas/glob"
)
@ -56,7 +56,7 @@ func FindAllMatchedBranches(ctx context.Context, repoID int64, ruleName string)
Page: page,
},
RepoID: repoID,
IsDeletedBranch: util.OptionalBoolFalse,
IsDeletedBranch: optional.Some(false),
})
if err != nil {
return nil, err