Skip to content

Commit 60a8758

Browse files
committed
Allow kwargs query string parameters when listing project issues (filtering)
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/issues.md
1 parent faa852f commit 60a8758

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gitlab/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,20 +764,19 @@ def getissues(self, page=1, per_page=20):
764764

765765
return False
766766

767-
def getprojectissues(self, project_id, page=1, per_page=20):
767+
def getprojectissues(self, project_id, page=1, per_page=20, **kwargs):
768768
"""Return a list of issues for project id.
769769
770770
:param: project_id: The id for the project.
771771
:return: list of issues
772772
"""
773-
data = {'page': page, 'per_page': per_page}
774773

774+
data = dict({'page': page, 'per_page': per_page}.items() | kwargs.items())
775775
request = requests.get("{}/{}/issues".format(self.projects_url, project_id),
776776
params=data, headers=self.headers, verify=self.verify_ssl)
777777
if request.status_code == 200:
778778
return json.loads(request.content.decode("utf-8"))
779779
else:
780-
781780
return False
782781

783782
def getprojectissue(self, project_id, issue_id):

0 commit comments

Comments
 (0)