Skip to main content

Concierge repository projects management CLI.

Project description

Build status Code health Updates Python versions Software license

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.

Why Should I Use This Tool?

Concierge-cli helps you analyze and bulk-update the repository projects you manage (e.g. set topics on projects, generate project lists for ModuleSync).

Installation

From PyPI:

$ pip install concierge-cli

Note: 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-cli

Preparation

You 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>

Usage Patterns

  1. Manage project topics

  2. List projects by topic

  3. List (and merge) merge requests by project

  4. Manage group membership and permissions

Manage topics

List all projects (for a private GitLab) that have no topics yet:

$ concierge-cli gitlab --uri https://git.vs.hn topics --empty

List all projects “foo” or similar in group “bar” or similar: (on GitLab.com)

$ concierge-cli gitlab topics bar/foo --empty

Set topics on all those projects:

$ concierge-cli gitlab topics bar/foo --empty --set-topic Puppet --set-topic Ansible

List all projects with topics now: (double-check)

$ concierge-cli gitlab topics bar/foo

List projects

Print a YAML list of all projects matching a topic:

$ concierge-cli gitlab projects --topic Puppet

Update 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 push

Merge requests

List of all merge requests of a project, optionally matching labels:

$ concierge-cli gitlab mrs mygroup/myproject --label mylabel

Add --merge yes to trigger merging all found requests.

Group membership

List all groups where user is not yet a member of:

$ concierge-cli gitlab groups --no-member my.user.name

Add user to all those groups:

$ concierge-cli gitlab groups --no-member my.user.name \
                       --set-permission maintainer

List a user’s group memberships and permissions:

$ concierge-cli gitlab groups my.user.name

Remove a user from selected groups:

$ concierge-cli gitlab groups my.user.name \
                       --group-filter a-group-name \
                       --set-permission none

Found a bug? Need a new feature?

Please see our Contribution Guide if you want to help out!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

concierge-cli-1.5.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

concierge_cli-1.5.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file concierge-cli-1.5.0.tar.gz.

File metadata

  • Download URL: concierge-cli-1.5.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.1

File hashes

Hashes for concierge-cli-1.5.0.tar.gz
Algorithm Hash digest
SHA256 846bf8f7072a1e9fe05679d848ec2ff7dd75f52d8c8b617133326a8d695eeb24
MD5 11545124808b2cdba1821360e5b3d5c0
BLAKE2b-256 53c597ab119b8c3f394a8e19d37bfac79de8ab253f5ce78795982d355a3ad017

See more details on using hashes here.

Provenance

File details

Details for the file concierge_cli-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: concierge_cli-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.1

File hashes

Hashes for concierge_cli-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b070927c3172b3515b79495cbf48b2a11ce445d3b237f068b79cfeca0f2b0409
MD5 c5547e4311efd958281cd6195b4b33a8
BLAKE2b-256 a0230059a5edfbe34bebb23f0c72eaf1d5136a4c0a11da97fbaba36c8628516d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page