Companion CLI for Concierge, the Configuration management & CI solution for aligning your multitude of Git repositories. Allows you to bulk-manage properties of your Git repository projects. Currently, GitLab is supported.
Concierge-cli helps you analyze and bulk-update the repository projects you manage (e.g. set topics on projects, generate project lists for ModuleSync).
From PyPI:
$ pip install concierge-cliNote: You need Python >= 3.6, otherwise your installation will not succeed (python-gitlab v2.0.0 dropped support for older Pythons). You can use Pipenv to work around this limitation:
$ pip install pipenv
$ pipenv shell --three
$ pip install concierge-cliYou need an access token of a GitLab user to access resources through the API. For groups and group membership this needs to be an administrator user. You may also want to disable notifications of the user(s) you plan to perform bulk updates on, to avoid sending out massive amounts of emails.
Set the GitLab URI and TOKEN as environment variables (if you want to avoid
using the --token and/or --uri options):
$ export CONCIERGE_GITLAB_URI=https://git.example.com/
$ export CONCIERGE_GITLAB_TOKEN=<redacted>- Manage project topics
- List projects by topic
- List (and merge) merge requests by project
- Manage group membership and permissions
List all projects (for a private GitLab) that have no topics yet:
$ concierge-cli gitlab --uri https://git.vs.hn topics --emptyList all projects "foo" or similar in group "bar" or similar: (on GitLab.com)
$ concierge-cli gitlab topics bar/foo --emptySet topics on all those projects:
$ concierge-cli gitlab topics bar/foo --empty --set-topic Puppet --set-topic AnsibleList all projects with topics now: (double-check)
$ concierge-cli gitlab topics bar/fooPrint a YAML list of all projects matching a topic:
$ concierge-cli gitlab projects --topic PuppetUpdate the list of modules Concierge manages with a specific configuration:
$ concierge-cli gitlab projects --topic Puppet > configs/foo-bar/managed_modules.yml
$ git add -v configs/foo-bar/managed_modules.yml
$ git status && git commit -m 'Added ...' && git pushList of all merge requests of a project, optionally matching labels:
$ concierge-cli gitlab mrs mygroup/myproject --label mylabelAdd --merge yes to trigger merging all found requests.
List all groups where user is not yet a member of:
$ concierge-cli gitlab groups --no-member my.user.nameAdd user to all those groups:
$ concierge-cli gitlab groups --no-member my.user.name \
--set-permission maintainerList a user's group memberships and permissions:
$ concierge-cli gitlab groups my.user.nameRemove a user from selected groups:
$ concierge-cli gitlab groups my.user.name \
--group-filter a-group-name \
--set-permission nonePlease see our Contribution Guide if you want to help out!