>>> gl = gitlab.Gitlab(gitlab_url, gitlab_secret)
>>> proj = gl.projects.get(project)
>>> [x.iid for x in proj.issues.list(page=1)]
[237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218]
>>> [x.iid for x in proj.issues.list(page=2)]
[237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218]
>>> [x.iid for x in proj.issues.list(page=1, per_page=5)]
[237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218]
url = self._construct_url(id_=None, obj=obj_class, parameters=kwargs)
return self._raw_list(url, obj_class, **kwargs)
for key in ['all', 'page', 'per_page', 'sudo', 'next_url']:
if key in params:
del params[key]
Only the first page is returned regardless of the value of
pageparameter. Theper_pageparam also is ignored.It appears that
Gitlab.list()boils down to the following:In
_raw_list, pagination params are stripped from the query: