Configure GitLab groups and projects settings automatically
Project description
gitlab-projects-settings
Configure GitLab groups and projects settings automatically
Purpose
This tool can automatically configure and update the GitLab settings
of groups, subgroups and projects, using multiple available options.
Repetitive tasks can be performed accross multiple projects at once,
for example protecting tags and branches, or setting a new avatar recursively.
The following step is required before using the tool:
- The GitLab user tokens must be created with an
api
scope (a short expiration date is recommended)
Usage
usage: gitlab-projects-settings [-h] [--version] [--update-check] [--settings] [--set GROUP KEY VAL] [-t TOKEN]
[--dry-run] [--exclude-group] [--exclude-subgroups] [--exclude-projects]
[--available-features] [--reset-features [KEEP_FEATURES]]
[--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] [--]
[gitlab] [path]
gitlab-projects-settings: Configure GitLab groups and projects settings automatically
internal arguments:
-h, --help # Show this help message
--version # Show the current version
--update-check # Check for newer package updates
--settings # Show the current settings path and contents
--set GROUP KEY VAL # Set settings specific 'VAL' value to [GROUP] > KEY
# or unset by using 'UNSET' as 'VAL'
credentials arguments:
-t TOKEN # GitLab API token (default: GITLAB_TOKEN environment)
common settings arguments:
--dry-run # Enable dry run mode to check without saving
--exclude-group # Exclude parent group settings
--exclude-subgroups # Exclude children subgroups settings
--exclude-projects # Exclude children projects settings
general settings arguments:
--available-features # List the available GitLab project features known by the tool
--reset-features [KEEP_FEATURES] # Reset features of GitLab projects based on usage
# (Optionally keep features separated by ",")
--disable-features FEATURES # List of features to disable separated by ","
--enable-features FEATURES # List of features to enable separated by ","
--reset-members # Reset members of GitLab projects and groups
--set-avatar FILE # Set avatar of GitLab projects and groups
--set-description TEXT # Set description of GitLab projects and groups
--update-description # Update description of GitLab projects and groups automatically
advanced settings arguments:
--run-housekeeping # Run housekeeping of project or projects GitLab in groups
--archive-project # Archive project or projects in GitLab groups
--unarchive-project # Unarchive project or projects in GitLab groups
--delete-group # Delete group or groups in GitLab groups
--delete-project # Delete project or projects in GitLab groups
repository settings arguments:
--protect-branches # Protect branches with default master/main, develop and staging
--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
Userspace available settings
gitlab-projects-settings
creates a settings.ini
configuration file in a userspace folder.
For example, it allows to disable the automated updates daily check ([updates] > enabled
)
The settings.ini
file location and contents can be shown with the following command:
gitlab-projects-settings --settings
Dependencies
- colored: Terminal colors and styles
- python-gitlab: A python wrapper for the GitLab API
- setuptools: Build and manage Python packages
- update-checker: Check for package updates on PyPI
References
- git-chglog: CHANGELOG generator
- gitlab-release: Utility for publishing on GitLab
- gitlabci-local: Launch .gitlab-ci.yml jobs locally
- mypy: Optional static typing for Python
- PyPI: The Python Package Index
- twine: Utility for publishing on PyPI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gitlab_projects_settings-4.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c85fe181e0862e73a39e88fa0cb79c03533682bfcdff1442253924fec7aae61d |
|
MD5 | e907a1fdaacc63bd7607f95442882659 |
|
BLAKE2b-256 | bdb511f493603e7399b1cca0086618125d6d1bb0df1bb69dc48650a0b5d3fd7f |
Hashes for gitlab_projects_settings-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 970fb677bee71ab758e0e08ecb8304ed1b6da49c660bce462c902fd0d6ef44a0 |
|
MD5 | 711d6d9f20409d5cebe64276deb15178 |
|
BLAKE2b-256 | 0840f6ab2df3ac845262cfcf1ae224296f88e3f1f8c83f61e0f45ac4b1323870 |