0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-05 18:35:09 +02:00

[models/search-options] add GroupID to SearchRepoOptions

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-01-09 18:58:16 -05:00
parent 987cf89cd3
commit e998ea34e4
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -158,6 +158,7 @@ type SearchRepoOptions struct {
OwnerID int64
PriorityOwnerID int64
TeamID int64
GroupID int64
OrderBy db.SearchOrderBy
Private bool // Include private repositories in results
StarredByID int64
@ -445,6 +446,9 @@ func SearchRepositoryCondition(opts SearchRepoOptions) builder.Cond {
if opts.TeamID > 0 {
cond = cond.And(builder.In("`repository`.id", builder.Select("`team_repo`.repo_id").From("team_repo").Where(builder.Eq{"`team_repo`.team_id": opts.TeamID})))
}
if opts.GroupID > 0 {
cond = cond.And(builder.Eq{"`repository`.group_id": opts.GroupID})
}
if opts.Keyword != "" {
// separate keyword