Gitlab Project Doctor
A CLI tool to cleanup a Gitlab repository
Report Bug
·
Request Feature
Table of Contents
About The Project
Gitlab is a CLI tool to clean up Gitlab repositories, especially (for now) :
- Old pipelines (with jobs and jobs artifacts)
- Obsolete packages from package registry
has first class support on Windows, macOS and Linux, with binary downloads available for every release
Getting Started
Installation
- Download the latest release for your OS
- Unzip and make gitlab-project-doctor executable
chmod +x gitlab-project-doctor
- The environment variable GL_TOKEN needs to be set with a private token with
sufficient privileges (owner of a project). For instance, on Linux :
read -s GL_TOKEN # To secretly set the variable
Usage
- You can analyze a project from a local Git path whose first remote is a
gitlab repository
cd my_favorite_gitlab_repo gitlab-project-doctor .
- Or you can analyze a project from a remote Gitlab repository
gitlab-project-doctor --url https://<your-gitlab-repo.com>/your-project-path
On Gitlab, if you allow duplicate packages (same name, same version), when you upload a package, the former one is not deleted. gitlab-project-doctor detects :
- Generic duplicate packages: same name, same version
- Maven SNAPSHOT duplicate packages: same artifactId, same SNAPSHOT version.
Roadmap
- Initial release with generic and maven packages detection
- Internationalization (French)
- Container registry
- Fat git repositories
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag " enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Geoffrey Arthaud - numerique-ecologie@developpement-durable.gouv.fr
Project Link: https://github.com/geoffreyarthaud/gitlab-project-doctor
Acknowledgments
- ripgrep project for Github actions