summaryrefslogtreecommitdiff
path: root/gitlab/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/__init__.py')
-rw-r--r--gitlab/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 32aa265..96a3c13 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -640,6 +640,12 @@ class Gitlab(object):
get_all = kwargs.pop("all", False)
url = self._build_url(path)
+ # use keyset pagination automatically, if all=True
+ order_by = kwargs.get("order_by")
+ if get_all and (not order_by or order_by == "id"):
+ kwargs["pagination"] = "keyset"
+ kwargs["order_by"] = "id"
+
if get_all is True and as_list is True:
return list(GitlabList(self, url, query_data, **kwargs))