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
c074f053
Commit
c074f053
authored
Mar 22, 2018
by
muc
Committed by
Sander van Harmelen
Mar 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ListMergeRequestPipelines (#360)
* Add ListMergeRequestPipelines * Code cleanup
parent
82f2ebac
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 @
c074f053
...
...
@@ -347,6 +347,31 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
return
m
,
resp
,
err
}
// ListMergeRequestPipelines gets all pipelines for the provided merge request.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#list-mr-pipelines
func
(
s
*
MergeRequestsService
)
ListMergeRequestPipelines
(
pid
interface
{},
mergeRequest
int
,
options
...
OptionFunc
)
(
PipelineList
,
*
Response
,
error
)
{
project
,
err
:=
parseID
(
pid
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
u
:=
fmt
.
Sprintf
(
"projects/%s/merge_requests/%v/pipelines"
,
url
.
QueryEscape
(
project
),
mergeRequest
)
req
,
err
:=
s
.
client
.
NewRequest
(
"GET"
,
u
,
nil
,
options
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
var
p
PipelineList
resp
,
err
:=
s
.
client
.
Do
(
req
,
&
p
)
if
err
!=
nil
{
return
nil
,
resp
,
err
}
return
p
,
resp
,
err
}
// GetIssuesClosedOnMergeOptions represents the available GetIssuesClosedOnMerge()
// 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