mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Additional API support for milestones (#3383)
This commit is contained in:
		@@ -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())
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user