File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Open diff view settings
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -1557,6 +1557,30 @@ def merge(self, merge_commit_message=None,
15571557 ** kwargs )
15581558 self ._update_attrs (server_data )
15591559
1560+ @cli .register_custom_action ('ProjectMergeRequest' )
1561+ @exc .on_http_error (exc .GitlabListError )
1562+ def participants (self , ** kwargs ):
1563+ """List the merge request participants.
1564+
1565+ Args:
1566+ all (bool): If True, return all the items, without pagination
1567+ per_page (int): Number of items to retrieve per request
1568+ page (int): ID of the page to return (starts with page 1)
1569+ as_list (bool): If set to False and no pagination option is
1570+ defined, return a generator instead of a list
1571+ **kwargs: Extra options to send to the server (e.g. sudo)
1572+
1573+ Raises:
1574+ GitlabAuthenticationError: If authentication is not correct
1575+ GitlabListError: If the list could not be retrieved
1576+
1577+ Returns:
1578+ RESTObjectList: The list of participants
1579+ """
1580+
1581+ path = '%s/%s/participants' % (self .manager .path , self .get_id ())
1582+ return self .manager .gitlab .http_get (path , ** kwargs )
1583+
15601584
15611585class ProjectMergeRequestManager (CRUDMixin , RESTManager ):
15621586 _path = '/projects/%(project_id)s/merge_requests'
Original file line number Diff line number Diff line change 527527mr = admin_project .mergerequests .create ({'source_branch' : 'branch1' ,
528528 'target_branch' : 'master' ,
529529 'title' : 'MR readme2' })
530+
531+ # basic testing: only make sure that the methods exist
532+ mr .commits ()
533+ mr .changes ()
534+ #mr.participants() # not yet available
535+
530536mr .merge ()
531537admin_project .branches .delete ('branch1' )
532538
You can’t perform that action at this time.
0 commit comments