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
9aad6bcb
Commit
9aad6bcb
authored
Dec 13, 2017
by
Michael Lihs
Committed by
Sander van Harmelen
Dec 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for DELETE merge request (#275)
parent
07e148aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
merge_requests.go
merge_requests.go
+19
-0
No files found.
merge_requests.go
View file @
9aad6bcb
...
@@ -423,6 +423,25 @@ func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest
...
@@ -423,6 +423,25 @@ func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest
return
m
,
resp
,
err
return
m
,
resp
,
err
}
}
// DeleteMergeRequest deletes a merge request.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#delete-a-merge-request
func
(
s
*
MergeRequestsService
)
DeleteMergeRequest
(
pid
interface
{},
mergeRequest
int
,
options
...
OptionFunc
)
(
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
return
nil
,
err
}
u
:=
fmt
.
Sprintf
(
"projects/%s/merge_requests/%d"
,
url
.
QueryEscape
(
project
),
mergeRequest
)
req
,
err
:=
s
.
client
.
NewRequest
(
"DELETE"
,
u
,
nil
,
options
)
if
err
!=
nil
{
return
nil
,
err
}
return
s
.
client
.
Do
(
req
,
nil
)
}
// AcceptMergeRequestOptions represents the available AcceptMergeRequest()
// AcceptMergeRequestOptions represents the available AcceptMergeRequest()
// options.
// options.
//
//
...
...
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