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
abd6d800
Commit
abd6d800
authored
Feb 15, 2017
by
Sander van Harmelen
Committed by
GitHub
Feb 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GetMergeRequestCommits (#128)
parent
3826965f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
merge_requests.go
merge_requests.go
+25
-0
No files found.
merge_requests.go
View file @
abd6d800
...
...
@@ -164,6 +164,31 @@ func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int
return
m
,
resp
,
err
}
// GetMergeRequestCommits gets a list of merge request commits.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-commits
func
(
s
*
MergeRequestsService
)
GetMergeRequestCommits
(
pid
interface
{},
mergeRequest
int
)
([]
*
Commit
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
u
:=
fmt
.
Sprintf
(
"projects/%s/merge_request/%d/commits"
,
url
.
QueryEscape
(
project
),
mergeRequest
)
req
,
err
:=
s
.
client
.
NewRequest
(
"GET"
,
u
,
nil
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
var
c
[]
*
Commit
resp
,
err
:=
s
.
client
.
Do
(
req
,
&
c
)
if
err
!=
nil
{
return
nil
,
resp
,
err
}
return
c
,
resp
,
err
}
// GetMergeRequestChanges shows information about the merge request including
// its files and changes.
//
...
...
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