From 09ab64dfad6754d88c7e4da15789bf845b19c30f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 18 May 2023 18:45:25 +0800 Subject: Remove duplicated issues options and some more refactors (#24787) This PR - [x] Move some code from `issue.go` to `issue_search.go` and `issue_update.go` - [x] Use `IssuesOptions` instead of `IssueStatsOptions` becuase they are too similiar. - [x] Rename some functions --- routers/web/repo/issue.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers') diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 66a4986139..cb0aaa3db5 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -206,10 +206,10 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti if forceEmpty { issueStats = &issues_model.IssueStats{} } else { - issueStats, err = issues_model.GetIssueStats(&issues_model.IssueStatsOptions{ + issueStats, err = issues_model.GetIssueStats(&issues_model.IssuesOptions{ RepoID: repo.ID, - Labels: selectLabels, - MilestoneID: milestoneID, + LabelIDs: labelIDs, + MilestoneIDs: []int64{milestoneID}, ProjectID: projectID, AssigneeID: assigneeID, MentionedID: mentionedID, -- cgit v1.2.3