Commit c787dbb4 authored by Sander van Harmelen's avatar Sander van Harmelen

Rename to

parent 641998da
......@@ -184,6 +184,24 @@ func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt
return m, resp, err
}
// DeleteMilestone deletes a specified project milestone.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#delete-project-milestone
func (s *MilestonesService) DeleteMilestone(pid interface{}, milestone int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/milestones/%d", url.QueryEscape(project), milestone)
req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
return s.client.Do(req, nil)
}
// GetMilestoneIssuesOptions represents the available GetMilestoneIssues() options.
//
// GitLab API docs:
......@@ -247,21 +265,3 @@ func (s *MilestonesService) GetMilestoneMergeRequests(pid interface{}, milestone
return mr, resp, err
}
// DeleteProjectMilestone deletes a specified project milestone
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#delete-project-milestone
func (s *MilestonesService) DeleteProjectMilestone(pid interface{}, milestone int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/milestones/%d", url.QueryEscape(project), milestone)
req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
return s.client.Do(req, nil)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment