Skip to content

Commit

Permalink
Add support for --all in CLI
Browse files Browse the repository at this point in the history
Fixes #153
  • Loading branch information
Gauvain Pocentek committed Sep 23, 2016
1 parent 4390afb commit 5860421
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/cli.rst
Expand Up @@ -136,12 +136,18 @@ Example:
Examples
========

List all the projects:
List the projects (paginated):

.. code-block:: console
$ gitlab project list
List all the projects:

.. code-block:: console
$ gitlab project list --all
Limit to 5 items per request, display the 1st page only

.. code-block:: console
Expand Down
2 changes: 2 additions & 0 deletions gitlab/cli.py
Expand Up @@ -379,6 +379,8 @@ def _populate_sub_parser_by_class(cls, sub_parser):
for x in cls.requiredListAttrs]
sub_parser_action.add_argument("--page", required=False)
sub_parser_action.add_argument("--per-page", required=False)
sub_parser_action.add_argument("--all", required=False,
action='store_true')

if action_name in ["get", "delete"]:
if cls not in [gitlab.CurrentUser]:
Expand Down

0 comments on commit 5860421

Please sign in to comment.