|
|
@@ -331,7 +331,7 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { |
|
|
|
} |
|
|
|
if opts.TopicName != "" { |
|
|
|
var subQueryCond = builder.NewCond() |
|
|
|
subQueryCond = subQueryCond.Or(builder.Eq{"topic.name": opts.TopicName}) |
|
|
|
subQueryCond = subQueryCond.Or(builder.Eq{"topic.name": strings.ToLower(opts.TopicName)}) |
|
|
|
subQuery := builder.Select("repo_topic.repo_id").From("repo_topic"). |
|
|
|
Join("INNER", "topic", "topic.id = repo_topic.topic_id"). |
|
|
|
Where(subQueryCond). |
|
|
|