X Tutup
Skip to content

Commit 5860421

Browse files
author
Gauvain Pocentek
committed
Add support for --all in CLI
Fixes python-gitlab#153
1 parent 4390afb commit 5860421

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/cli.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,18 @@ Example:
136136
Examples
137137
========
138138

139-
List all the projects:
139+
List the projects (paginated):
140140

141141
.. code-block:: console
142142
143143
$ gitlab project list
144144
145+
List all the projects:
146+
147+
.. code-block:: console
148+
149+
$ gitlab project list --all
150+
145151
Limit to 5 items per request, display the 1st page only
146152

147153
.. code-block:: console

gitlab/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ def _populate_sub_parser_by_class(cls, sub_parser):
379379
for x in cls.requiredListAttrs]
380380
sub_parser_action.add_argument("--page", required=False)
381381
sub_parser_action.add_argument("--per-page", required=False)
382+
sub_parser_action.add_argument("--all", required=False,
383+
action='store_true')
382384

383385
if action_name in ["get", "delete"]:
384386
if cls not in [gitlab.CurrentUser]:

0 commit comments

Comments
 (0)
X Tutup