Skip to content

Commit e9d48cf

Browse files
nejchJohnVillalovos
authored andcommitted
fix(cli): remove deprecated --all option in favor of --get-all
BREAKING CHANGE: The `--all` option is no longer available in the CLI. Use `--get-all` instead.
1 parent d054917 commit e9d48cf

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

docs/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Example::
4242
Not all items are returned from the API
4343
"""""""""""""""""""""""""""""""""""""""
4444

45-
If you've passed ``all=True`` (or ``--all`` via the CLI) to the API and still cannot see all items returned,
45+
If you've passed ``all=True`` to the API and still cannot see all items returned,
4646
use ``get_all=True`` (or ``--get-all`` via the CLI) instead. See :ref:`pagination` for more details.
4747

4848
Common errors

gitlab/v4/cli.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,6 @@ def _populate_sub_parser_by_class(
236236
action="store_true",
237237
help="Return all items from the server, without pagination.",
238238
)
239-
sub_parser_action.add_argument(
240-
"--all",
241-
required=False,
242-
action="store_true",
243-
help="Deprecated. Use --get-all instead.",
244-
)
245239

246240
if action_name == "delete":
247241
if cls._id_attr is not None:

gitlab/v4/objects/commits.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class ProjectCommitManager(RetrieveMixin, CreateMixin, RESTManager):
155155
optional=("author_email", "author_name"),
156156
)
157157
_list_filters = (
158+
"all",
158159
"ref_name",
159160
"since",
160161
"until",

tests/functional/cli/test_cli_repository.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ def test_list_all_commits(gitlab_cli, project):
4343
assert commit.id not in ret.stdout
4444

4545
# Listing commits on other branches requires `all` parameter passed to the API
46-
cmd = ["project-commit", "list", "--project-id", project.id, "--get-all", "--all"]
46+
cmd = [
47+
"project-commit",
48+
"list",
49+
"--project-id",
50+
project.id,
51+
"--get-all",
52+
"--all",
53+
"true",
54+
]
4755
ret_all = gitlab_cli(cmd)
4856
assert commit.id in ret_all.stdout
4957
assert len(ret_all.stdout) > len(ret.stdout)

0 commit comments

Comments
 (0)