Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32ae924

Browse filesBrowse files
author
Gauvain Pocentek
committed
Implement MR.pipelines()
Closes python-gitlab#555
1 parent 0379efa commit 32ae924
Copy full SHA for 32ae924

File tree

Expand file treeCollapse file tree

2 files changed

+26
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+26
-0
lines changed
Open diff view settings
Collapse file

‎docs/gl_objects/mrs.rst‎

Copy file name to clipboardExpand all lines: docs/gl_objects/mrs.rst
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ List commits of a MR::
116116

117117
commits = mr.commits()
118118

119+
List the changes of a MR::
120+
121+
changes = mr.changes()
122+
123+
List the pipelines for a MR::
124+
125+
pipelines = mr.pipelines()
126+
119127
List issues that will close on merge::
120128

121129
mr.closes_issues()
Collapse file

‎gitlab/v4/objects.py‎

Copy file name to clipboardExpand all lines: gitlab/v4/objects.py
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,6 +2157,24 @@ def changes(self, **kwargs):
21572157
path = '%s/%s/changes' % (self.manager.path, self.get_id())
21582158
return self.manager.gitlab.http_get(path, **kwargs)
21592159

2160+
@cli.register_custom_action('ProjectMergeRequest')
2161+
@exc.on_http_error(exc.GitlabListError)
2162+
def pipelines(self, **kwargs):
2163+
"""List the merge request pipelines.
2164+
2165+
Args:
2166+
**kwargs: Extra options to send to the server (e.g. sudo)
2167+
2168+
Raises:
2169+
GitlabAuthenticationError: If authentication is not correct
2170+
GitlabListError: If the list could not be retrieved
2171+
2172+
Returns:
2173+
RESTObjectList: List of changes
2174+
"""
2175+
path = '%s/%s/pipelines' % (self.manager.path, self.get_id())
2176+
return self.manager.gitlab.http_get(path, **kwargs)
2177+
21602178
@cli.register_custom_action('ProjectMergeRequest', tuple(),
21612179
('merge_commit_message',
21622180
'should_remove_source_branch',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.