Commit d2fa32c5 authored by Adrian DC's avatar Adrian DC
Browse files

feat(entrypoint): sort groups and projects recursively

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent abe2d341
Loading
Loading
Loading
Loading
+8 −2
Changes for src/cli/entrypoint.py: 8 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -76,11 +76,14 @@ class Entrypoint:

            # Iterate through subgroups
            if not options.exclude_subgroups:
                for group_subgroup in group.descendant_groups.list(
                for group_subgroup in sorted(
                        group.descendant_groups.list(
                            get_all=True,
                            include_subgroups=True,
                            order_by='path',
                            sort='asc',
                        ),
                        key=lambda item: item.full_path,
                ):
                    Entrypoint.group(
                        options,
@@ -91,11 +94,14 @@ class Entrypoint:

            # Iterate through projects
            if not options.exclude_projects:
                for group_project in group.projects.list(
                for group_project in sorted(
                        group.projects.list(
                            get_all=True,
                            include_subgroups=not options.exclude_subgroups,
                            order_by='path',
                            sort='asc',
                        ),
                        key=lambda item: item.path_with_namespace,
                ):
                    Entrypoint.project(
                        options,