Commit 878c719f authored by Adrian DC's avatar Adrian DC
Browse files

feat(main): document optional '--' positional arguments separator

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 2c52366f
Loading
Loading
Loading
Loading
+2 −0
Changes for .gitlab-ci.yml: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ readme:
        argument='[[:alnum:]][[:alnum:]_-]\{0,\}'
        letter='[[:alnum:]_]\{1\}'
        parameter='[-]\{1,2\}[[:alnum:]][[:alnum:]_-]\{0,\}'
        separator='--'
        word='[[:alnum:]_-]\{1,\}'
        help="[(]\{0,1\}${word}"
        "${PACKAGE_NAME}" --help \
@@ -178,6 +179,7 @@ readme:
          | sed "s/^\(  ${parameter} ${word}${alignments}\)/\1# /g" \
          | sed "s/^\(  ${parameter}${alignments}\)/\1# /g" \
          | sed "s/^\(  ${parameter}, ${parameter}${alignments}\)/\1# /g" \
          | sed "s/^\(  ${separator}${alignments}\)/\1# /g" \
          | sed "s/^\(  ${argument}${alignments}\)/\1# /g" \
          | sed "s/^\(  ${alignments}\)\(${help}\)/\1# \2/g"
        echo '```'
+2 −1
Changes for README.md: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ usage: gitlab-projects-settings [-h] [--version] [-t TOKEN] [--dry-run] [--exclu
                                [--disable-features FEATURES] [--enable-features FEATURES] [--reset-members]
                                [--set-avatar FILE] [--set-description TEXT] [--update-description]
                                [--run-housekeeping] [--archive-project | --unarchive-project] [--delete-group]
                                [--delete-project] [--protect-branches] [--protect-tags LEVEL]
                                [--delete-project] [--protect-branches] [--protect-tags LEVEL] [--]
                                [gitlab] [path]

gitlab-projects-settings: Configure GitLab groups and projects settings automatically
@@ -74,6 +74,7 @@ repository settings arguments:
  --protect-tags LEVEL              # Protect tags at level [no-one,admins,maintainers,developers]

positional arguments:
  --                                # Positional arguments separator (recommended)
  gitlab                            # GitLab URL (default: https://gitlab.com)
  path                              # GitLab group, user namespace or project path
```
+6 −0
Changes for src/cli/main.py: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -198,6 +198,12 @@ def main() -> None:

    # Arguments positional definitions
    group = parser.add_argument_group('positional arguments')
    group.add_argument(
        '--',
        dest='double_dash',
        action='store_true',
        help='Positional arguments separator (recommended)',
    )
    group.add_argument(
        dest='gitlab',
        action='store',