Commit 7dd71bfd authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch '4-add-variable-to-control-dry-run-mode' into 'main'

Resolve "Add variable to control dry run mode"

Closes #4

See merge request to-be-continuous/tools/gitlab-butler!28
parents 8a612d60 a69bae59
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -49,14 +49,14 @@ options:
```

| CLI option                          | Env. Variable                  | Description                                                                                    |
| ----------------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------- |
|-------------------------------------|--------------------------------|------------------------------------------------------------------------------------------------|
| `--api-api`                         | `$GITLAB_API`                  | GitLab source API url (defaults to `https://gitlab.com/api/v4`)                                |
| `--insecure`                        | `$INSECURE`                    | skip SSL verification                                                                          |
| `--token`                           | `$GITLAB_TOKEN`                | GitLab source token                                                                            |
| `--group-path`                      | `$GROUP_PATH`                  | GitLab root group path to cleanup (**mandatory**)                                              |
| `--skip-subgroups`                  | _none_                         | skip subgroups cleaning                                                                        |
| `--exclude`                         | `$EXCLUDE`                     | project/group path(s) to exclude (multiple CLI option; env. variable is a coma separated list) |
| `--dry-run`                         | _none_                         | dry run (don't execute any write action)                                                       |
| `--dry-run`                         | `$DRY_RUN`                     | dry run (don't execute any write action)                                                       |
| `--verbose`                         | _none_                         | verbose logs                                                                                   |
| `--halt-on-error`                   | _none_                         | halt when an error occurs                                                                      |
| `--delay-between-api-calls-in-secs` | _none_                         | delay between GitLab API calls, in seconds (default = 3 seconds)                               |
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ def run() -> None:
    parser.add_argument(
        "--dry-run",
        action="store_true",
        default=os.getenv("DRY_RUN") in ["true", "yes", "1"],
        help="dry run (don't execute any write action)",
    )
    parser.add_argument(