openedx / repo-tools

Tools for repo maintenance, etc.
Apache License 2.0
31 stars 40 forks source link

Rename and decorate repo checks #549

Closed kdmccormick closed 3 months ago

kdmccormick commented 3 months ago

Rename teams to be a bit more consistent and brief.

Also, get rid of the hardcoded CHECKS list in exchange for a @Check.register decorator.

Before:

(venv) ~/openedx/repo-tools 🍀 repo_checks --help
Usage: repo_checks [OPTIONS]

  Entry point for command-line invocation.

Options:
  --github-token TEXT             A github personal access token.  [required]
  --org TEXT                      The github org that you wish check.
  -n, --dry-run / --no-dry-run    Show what changes would be made without
                                  making them.
  -c, --check [RequiredCLACheck|RequireTriageTeamAccess|EnsureLabels|EnsureWorkflowTemplates|EnsureNoAdminOrMaintainTeams|EnsureRepoSettings|EnsureNoDirectRepoAccessToUsers]
                                  Limit to specific check(s), case-
                                  insensitive.
  -r, --repo TEXT                 Limit to specific repo(s).
  -s, --start-at TEXT             Which repo in the list to start running
                                  checks at.
  --help                          Show this message and exit.

After:

(venv) ~/openedx/repo-tools 🍀 repo_checks --help
Usage: repo_checks [OPTIONS]

  Entry point for command-line invocation.

Options:
  --github-token TEXT             A github personal access token.  [required]
  --org TEXT                      The github org that you wish check.
  -n, --dry-run / --no-dry-run    Show what changes would be made without
                                  making them.
  -c, --check [Settings|NoAdminOrMaintainTeams|Workflows|Labels|TriageTeam|EnforceCLA|NoDirectUsers]
                                  Limit to specific check(s), case-
                                  insensitive.
  -r, --repo TEXT                 Limit to specific repo(s).
  -s, --start-at TEXT             Which repo in the list to start running
                                  checks at.
  --help                          Show this message and exit.