diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-05-18 18:45:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 10:45:25 +0000 |
commit | 09ab64dfad6754d88c7e4da15789bf845b19c30f (patch) | |
tree | f70f2344f00b4ce4e0d700bfa2f04d5c37256eb0 /routers | |
parent | 76138ca5a98f6f8b949eb6a5a53466a942ae4fae (diff) | |
download | gitea-09ab64dfad6754d88c7e4da15789bf845b19c30f.tar.gz gitea-09ab64dfad6754d88c7e4da15789bf845b19c30f.zip |
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
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/issue.go | 6 |
1 files changed, 3 insertions, 3 deletions
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, |