mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-07-29 20:43:08 +08:00
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:
models
actions
auth
issues
comment.goissue_search.goissue_stats.golabel.gomilestone.gomilestone_list.gomilestone_test.goreview_list.gotracked_time.gotracked_time_test.go
packages
project
repo
user
webhook
modules
routers
api
packages
cargo
chef
composer
goproxy
helm
npm
nuget
rubygems
swift
v1
web
admin
auth
org
repo
shared
user
services
auth
migrations
packages
pull
repository
webhook
@ -153,11 +153,11 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
|
||||
query.Must(q)
|
||||
}
|
||||
|
||||
if !options.IsPull.IsNone() {
|
||||
query.Must(elastic.NewTermQuery("is_pull", options.IsPull.IsTrue()))
|
||||
if options.IsPull.Has() {
|
||||
query.Must(elastic.NewTermQuery("is_pull", options.IsPull.Value()))
|
||||
}
|
||||
if !options.IsClosed.IsNone() {
|
||||
query.Must(elastic.NewTermQuery("is_closed", options.IsClosed.IsTrue()))
|
||||
if options.IsClosed.Has() {
|
||||
query.Must(elastic.NewTermQuery("is_closed", options.IsClosed.Value()))
|
||||
}
|
||||
|
||||
if options.NoLabelOnly {
|
||||
|
Reference in New Issue
Block a user