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
b7192664
Commit
b7192664
authored
Nov 09, 2018
by
Sander van Harmelen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the MR approval calls (use POST instead of GET)
parent
728df5cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
merge_request_approvals.go
merge_request_approvals.go
+3
-3
No files found.
merge_request_approvals.go
View file @
b7192664
...
...
@@ -77,7 +77,7 @@ func (m MergeRequestApprovals) String() string {
// GitLab API docs:
// https://docs.gitlab.com/ee/api/merge_request_approvals.html#approve-merge-request
type
ApproveMergeRequestOptions
struct
{
S
ha
*
string
`url:"sha,omitempty" json:"sha,omitempty"`
S
HA
*
string
`url:"sha,omitempty" json:"sha,omitempty"`
}
// ApproveMergeRequest approves a merge request on GitLab. If a non-empty sha
...
...
@@ -92,7 +92,7 @@ func (s *MergeRequestApprovalsService) ApproveMergeRequest(pid interface{}, mr i
}
u
:=
fmt
.
Sprintf
(
"projects/%s/merge_requests/%d/approve"
,
url
.
QueryEscape
(
project
),
mr
)
req
,
err
:=
s
.
client
.
NewRequest
(
"
GE
T"
,
u
,
opt
,
options
)
req
,
err
:=
s
.
client
.
NewRequest
(
"
POS
T"
,
u
,
opt
,
options
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
...
...
@@ -117,7 +117,7 @@ func (s *MergeRequestApprovalsService) UnapproveMergeRequest(pid interface{}, mr
}
u
:=
fmt
.
Sprintf
(
"projects/%s/merge_requests/%d/unapprove"
,
url
.
QueryEscape
(
project
),
mr
)
req
,
err
:=
s
.
client
.
NewRequest
(
"
GE
T"
,
u
,
nil
,
options
)
req
,
err
:=
s
.
client
.
NewRequest
(
"
POS
T"
,
u
,
nil
,
options
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
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