@@ -542,7 +542,10 @@ class GroupIssueManager(ListMixin, RESTManager):
542542 _path = '/groups/%(group_id)s/issues'
543543 _obj_cls = GroupIssue
544544 _from_parent_attrs = {'group_id' : 'id' }
545- _list_filters = ('state' , 'labels' , 'milestone' , 'order_by' , 'sort' )
545+ _list_filters = ('state' , 'labels' , 'milestone' , 'order_by' , 'sort' ,
546+ 'iids' , 'author_id' , 'assignee_id' , 'my_reaction_emoji' ,
547+ 'search' , 'created_after' , 'created_before' ,
548+ 'updated_after' , 'updated_before' )
546549 _types = {'labels' : types .ListAttribute }
547550
548551
@@ -772,7 +775,10 @@ class Issue(RESTObject):
772775class IssueManager (ListMixin , RESTManager ):
773776 _path = '/issues'
774777 _obj_cls = Issue
775- _list_filters = ('state' , 'labels' , 'order_by' , 'sort' )
778+ _list_filters = ('state' , 'labels' , 'milestone' , 'scope' , 'author_id' ,
779+ 'assignee_id' , 'my_reaction_emoji' , 'iids' , 'order_by' ,
780+ 'sort' , 'search' , 'created_after' , 'created_before' ,
781+ 'updated_after' , 'updated_before' )
776782 _types = {'labels' : types .ListAttribute }
777783
778784
@@ -1440,8 +1446,8 @@ class ProjectIssueDiscussionManager(RetrieveMixin, CreateMixin, RESTManager):
14401446
14411447
14421448class ProjectIssue (UserAgentDetailMixin , SubscribableMixin , TodoMixin ,
1443- TimeTrackingMixin , SaveMixin , ObjectDeleteMixin ,
1444- RESTObject ):
1449+ TimeTrackingMixin , ParticipantsMixin , SaveMixin ,
1450+ ObjectDeleteMixin , RESTObject ):
14451451 _short_print_attr = 'title'
14461452 _id_attr = 'iid'
14471453 _managers = (
@@ -1469,18 +1475,42 @@ def move(self, to_project_id, **kwargs):
14691475 ** kwargs )
14701476 self ._update_attrs (server_data )
14711477
1478+ @cli .register_custom_action ('ProjectIssue' )
1479+ @exc .on_http_error (exc .GitlabGetError )
1480+ def closed_by (self , ** kwargs ):
1481+ """List merge requests that will close the issue when merged.
1482+
1483+ Args:
1484+ **kwargs: Extra options to send to the server (e.g. sudo)
1485+
1486+ Raises:
1487+ GitlabAuthenticationError: If authentication is not correct
1488+ GitlabGetErrot: If the merge requests could not be retrieved
1489+
1490+ Returns:
1491+ list: The list of merge requests.
1492+ """
1493+ path = '%s/%s/closed_by' % (self .manager .path , self .get_id ())
1494+ return self .manager .gitlab .http_get (path , ** kwargs )
1495+
14721496
14731497class ProjectIssueManager (CRUDMixin , RESTManager ):
14741498 _path = '/projects/%(project_id)s/issues/'
14751499 _obj_cls = ProjectIssue
14761500 _from_parent_attrs = {'project_id' : 'id' }
1477- _list_filters = ('state' , 'labels' , 'milestone' , 'order_by' , 'sort' )
1501+ _list_filters = ('iids' , 'state' , 'labels' , 'milestone' , 'scope' ,
1502+ 'author_id' , 'assignee_id' , 'my_reaction_emoji' ,
1503+ 'order_by' , 'sort' , 'search' , 'created_after' ,
1504+ 'created_before' , 'updated_after' , 'updated_before' )
14781505 _create_attrs = (('title' , ),
1479- ('description' , 'assignee_id' , 'milestone_id' , 'labels' ,
1480- 'created_at' , 'due_date' ))
1481- _update_attrs = (tuple (), ('title' , 'description' , 'assignee_id' ,
1482- 'milestone_id' , 'labels' , 'created_at' ,
1483- 'updated_at' , 'state_event' , 'due_date' ))
1506+ ('description' , 'confidential' , 'assignee_id' ,
1507+ 'assignee_idss' 'milestone_id' , 'labels' , 'created_at' ,
1508+ 'due_date' , 'merge_request_to_resolve_discussions_of' ,
1509+ 'discussion_to_resolve' ))
1510+ _update_attrs = (tuple (), ('title' , 'description' , 'confidential' ,
1511+ 'assignee_ids' , 'assignee_id' , 'milestone_id' ,
1512+ 'labels' , 'state_event' , 'updated_at' ,
1513+ 'due_date' , 'discussion_locked' ))
14841514 _types = {'labels' : types .ListAttribute }
14851515
14861516
@@ -1655,7 +1685,8 @@ class ProjectMergeRequestDiscussionManager(RetrieveMixin, CreateMixin,
16551685
16561686
16571687class ProjectMergeRequest (SubscribableMixin , TodoMixin , TimeTrackingMixin ,
1658- SaveMixin , ObjectDeleteMixin , RESTObject ):
1688+ ParticipantsMixin , SaveMixin , ObjectDeleteMixin ,
1689+ RESTObject ):
16591690 _id_attr = 'iid'
16601691
16611692 _managers = (
@@ -1793,30 +1824,6 @@ def merge(self, merge_commit_message=None,
17931824 ** kwargs )
17941825 self ._update_attrs (server_data )
17951826
1796- @cli .register_custom_action ('ProjectMergeRequest' )
1797- @exc .on_http_error (exc .GitlabListError )
1798- def participants (self , ** kwargs ):
1799- """List the merge request participants.
1800-
1801- Args:
1802- all (bool): If True, return all the items, without pagination
1803- per_page (int): Number of items to retrieve per request
1804- page (int): ID of the page to return (starts with page 1)
1805- as_list (bool): If set to False and no pagination option is
1806- defined, return a generator instead of a list
1807- **kwargs: Extra options to send to the server (e.g. sudo)
1808-
1809- Raises:
1810- GitlabAuthenticationError: If authentication is not correct
1811- GitlabListError: If the list could not be retrieved
1812-
1813- Returns:
1814- RESTObjectList: The list of participants
1815- """
1816-
1817- path = '%s/%s/participants' % (self .manager .path , self .get_id ())
1818- return self .manager .gitlab .http_get (path , ** kwargs )
1819-
18201827
18211828class ProjectMergeRequestManager (CRUDMixin , RESTManager ):
18221829 _path = '/projects/%(project_id)s/merge_requests'
0 commit comments