diff options
| author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-09-23 07:15:41 +0200 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-09-23 07:15:41 +0200 |
| commit | 58604213efbe4d275be8da6615ed77d6f3510cbe (patch) | |
| tree | d0df0fa48931ad1f663cef4c263093fda0842c55 | |
| parent | 4390afbff39deb5a33b857342dae6ee494684ce7 (diff) | |
| download | gitlab-58604213efbe4d275be8da6615ed77d6f3510cbe.tar.gz | |
Add support for --all in CLI
Fixes #153
| -rw-r--r-- | docs/cli.rst | 8 | ||||
| -rw-r--r-- | gitlab/cli.py | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/docs/cli.rst b/docs/cli.rst index 7721f54..8b79d78 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -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 diff --git a/gitlab/cli.py b/gitlab/cli.py index 9f7f414..1826a7b 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -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]: |
