summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-06-06 01:37:45 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2019-06-06 08:37:45 +0800
commitde6539fc8c37485afcd6f30092a9ccbc3cae7de5 (patch)
tree02aec172ffe99ac123b56b301c70774f1f3f1292 /routers/repo
parent59e6a7b97f503c12ef2a6096ca7f127f81521b7a (diff)
downloadgitea-de6539fc8c37485afcd6f30092a9ccbc3cae7de5.tar.gz
gitea-de6539fc8c37485afcd6f30092a9ccbc3cae7de5.zip
Add state param to milestone listing API (#7131)
* Support state params * update tests * fix tests * add state=all support * update tests * update swagger * update swagger
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/issue.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index c2749fcb47..f6030c9823 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -24,6 +24,7 @@ import (
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
"github.com/Unknwon/com"
@@ -305,7 +306,7 @@ func Issues(ctx *context.Context) {
var err error
// Get milestones.
- ctx.Data["Milestones"], err = models.GetMilestonesByRepoID(ctx.Repo.Repository.ID)
+ ctx.Data["Milestones"], err = models.GetMilestonesByRepoID(ctx.Repo.Repository.ID, api.StateType(ctx.Query("state")))
if err != nil {
ctx.ServerError("GetAllRepoMilestones", err)
return