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:
parent
4b494d341f
commit
8ff858b94b
24 changed files with 84 additions and 64 deletions
|
@ -27,6 +27,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/gitrepo"
|
||||
code_indexer "code.gitea.io/gitea/modules/indexer/code"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/optional"
|
||||
repo_module "code.gitea.io/gitea/modules/repository"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
@ -672,7 +673,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
|
|||
|
||||
branchOpts := git_model.FindBranchOptions{
|
||||
RepoID: ctx.Repo.Repository.ID,
|
||||
IsDeletedBranch: util.OptionalBoolFalse,
|
||||
IsDeletedBranch: optional.Some(false),
|
||||
ListOptions: db.ListOptionsAll,
|
||||
}
|
||||
branchesTotal, err := db.Count[git_model.Branch](ctx, branchOpts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue