forked from forgejo/forgejo
feat(repo): support search repository by topic name (#4505)
* feat(repo): support search repository by topic name
This commit is contained in:
parent
7dd93b2441
commit
ea20adaa84
17 changed files with 134 additions and 26 deletions
|
@ -105,6 +105,8 @@ func Profile(ctx *context.Context) {
|
|||
page = 1
|
||||
}
|
||||
|
||||
topicOnly := ctx.QueryBool("topic")
|
||||
|
||||
var (
|
||||
repos []*models.Repository
|
||||
count int64
|
||||
|
@ -174,6 +176,7 @@ func Profile(ctx *context.Context) {
|
|||
PageSize: setting.UI.User.RepoPagingNum,
|
||||
Starred: true,
|
||||
Collaborate: util.OptionalBoolFalse,
|
||||
TopicOnly: topicOnly,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("SearchRepositoryByName", err)
|
||||
|
@ -217,6 +220,7 @@ func Profile(ctx *context.Context) {
|
|||
IsProfile: true,
|
||||
PageSize: setting.UI.User.RepoPagingNum,
|
||||
Collaborate: util.OptionalBoolFalse,
|
||||
TopicOnly: topicOnly,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("SearchRepositoryByName", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue