mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
[API] Issue Search Add filter for MilestoneNames (#16173)
This commit is contained in:
@@ -1100,6 +1100,7 @@ type IssuesOptions struct {
|
||||
LabelIDs []int64
|
||||
IncludedLabelNames []string
|
||||
ExcludedLabelNames []string
|
||||
IncludeMilestones []string
|
||||
SortType string
|
||||
IssueIDs []int64
|
||||
UpdatedAfterUnix int64
|
||||
@@ -1241,6 +1242,13 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) {
|
||||
if len(opts.ExcludedLabelNames) > 0 {
|
||||
sess.And(builder.NotIn("issue.id", BuildLabelNamesIssueIDsCondition(opts.ExcludedLabelNames)))
|
||||
}
|
||||
|
||||
if len(opts.IncludeMilestones) > 0 {
|
||||
sess.In("issue.milestone_id",
|
||||
builder.Select("id").
|
||||
From("milestone").
|
||||
Where(builder.In("name", opts.IncludeMilestones)))
|
||||
}
|
||||
}
|
||||
|
||||
func applyReposCondition(sess *xorm.Session, repoIDs []int64) *xorm.Session {
|
||||
|
Reference in New Issue
Block a user