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

feat(main): rename '--avoid-*' parameters to '--exclude-*'

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 317c4fdc
Loading
Loading
Loading
Loading
Loading
+5 −5
Changes for README.md: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -23,8 +23,8 @@ for example protecting tags and branches, or setting a new avatar recursively.
<!-- prettier-ignore-start -->

```yaml
usage: gitlab-projects-settings [-h] [--version] [-t TOKEN] [--dry-run] [--avoid-group]
                                [--avoid-subgroups] [--avoid-projects] [--reset-features]
usage: gitlab-projects-settings [-h] [--version] [-t TOKEN] [--dry-run] [--exclude-group]
                                [--exclude-subgroups] [--exclude-projects] [--reset-features]
                                [--reset-members] [--set-avatar FILE] [--set-description TEXT]
                                [--update-description] [--protect-branches]
                                [--protect-tags LEVEL]
@@ -41,9 +41,9 @@ credentials arguments:

common settings arguments:
  --dry-run             # Enable dry run mode to check without saving
  --avoid-group         # Avoid affecting parent group settings
  --avoid-subgroups     # Avoid affecting children subgroups settings
  --avoid-projects      # Avoid affecting children projects settings
  --exclude-group       # Exclude parent group settings
  --exclude-subgroups   # Exclude children subgroups settings
  --exclude-projects    # Exclude children projects settings

general settings arguments:
  --reset-features      # Reset features of GitLab projects based on usage
+9 −9
Changes for gitlab_projects_settings/cli/main.py: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -61,22 +61,22 @@ def main() -> None:
        help='Enable dry run mode to check without saving',
    )
    group.add_argument(
        '--avoid-group',
        dest='avoid_group',
        '--exclude-group',
        dest='exclude_group',
        action='store_true',
        help='Avoid affecting parent group settings',
        help='Exclude parent group settings',
    )
    group.add_argument(
        '--avoid-subgroups',
        dest='avoid_subgroups',
        '--exclude-subgroups',
        dest='exclude_subgroups',
        action='store_true',
        help='Avoid affecting children subgroups settings',
        help='Exclude children subgroups settings',
    )
    group.add_argument(
        '--avoid-projects',
        dest='avoid_projects',
        '--exclude-projects',
        dest='exclude_projects',
        action='store_true',
        help='Avoid affecting children projects settings',
        help='Exclude children projects settings',
    )

    # Arguments general settings definitions
+4 −4
Changes for gitlab_projects_settings/features/settings.py: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -57,11 +57,11 @@ class SettingsFeature:
        elif group:

            # Handle group
            if not options.avoid_group:
            if not options.exclude_group:
                SettingsFeature.group(options, gitlab, group.id)

            # Iterate through subgroups
            if not options.avoid_subgroups:
            if not options.exclude_subgroups:
                for group_subgroup in group.descendant_groups.list(
                        get_all=True,
                        include_subgroups=True,
@@ -71,10 +71,10 @@ class SettingsFeature:
                    SettingsFeature.group(options, gitlab, group_subgroup.id)

            # Iterate through projects
            if not options.avoid_projects:
            if not options.exclude_projects:
                for group_project in group.projects.list(
                        get_all=True,
                        include_subgroups=not options.avoid_subgroups,
                        include_subgroups=not options.exclude_subgroups,
                        order_by='path',
                        sort='asc',
                ):