Commit 058f4b1f authored by matm's avatar matm

Add DeleteIssue() method

parent 6b5e3570
......@@ -254,3 +254,26 @@ func (s *IssuesService) UpdateIssue(
return i, resp, err
}
// DeleteIssue deletes a single project issue.
//
// GitLab API docs: http://doc.gitlab.com/ce/api/issues.html#delete-an-issue
func (s *IssuesService) DeleteIssue(pid interface{}, issue int) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d", url.QueryEscape(project), issue)
req, err := s.client.NewRequest("DELETE", u, nil)
if err != nil {
return nil, err
}
resp, err := s.client.Do(req, nil)
if err != nil {
return resp, err
}
return resp, err
}
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