Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
c787dbb4
Commit
c787dbb4
authored
Apr 16, 2018
by
Sander van Harmelen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to
parent
641998da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
milestones.go
milestones.go
+18
-18
No files found.
milestones.go
View file @
c787dbb4
...
...
@@ -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
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment