mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 13:50:39 +00:00
Additional API support for milestones (#3383)
This commit is contained in:
parent
06602a84ff
commit
84b56c3c53
3 changed files with 238 additions and 0 deletions
|
@ -259,6 +259,11 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
Delete(repo.ClearIssueLabels)
|
||||
m.Delete("/:id", repo.DeleteIssueLabel)
|
||||
})
|
||||
m.Group("/milestone", func() {
|
||||
m.Combo("").Get(repo.GetIssueMilestone).
|
||||
Post(bind(api.SetIssueMilestoneOption{}), repo.SetIssueMilestone).
|
||||
Delete(repo.DeleteIssueMilestone)
|
||||
})
|
||||
|
||||
})
|
||||
}, mustEnableIssues)
|
||||
|
@ -268,6 +273,13 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
m.Combo("/:id").Get(repo.GetLabel).Patch(bind(api.EditLabelOption{}), repo.EditLabel).
|
||||
Delete(repo.DeleteLabel)
|
||||
})
|
||||
m.Group("/milestones", func() {
|
||||
m.Combo("").Get(repo.ListMilestones).
|
||||
Post(bind(api.CreateMilestoneOption{}), repo.CreateMilestone)
|
||||
m.Combo("/:id").Get(repo.GetMilestone).Patch(bind(api.EditMilestoneOption{}), repo.EditMilestone).
|
||||
Delete(repo.DeleteMilestone)
|
||||
m.Post("/:id/:action", repo.ChangeMilestoneStatus)
|
||||
})
|
||||
}, repoAssignment())
|
||||
}, reqToken())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue