Skip to content
Snippets Groups Projects

Contributors Forks Stargazers Issues MIT License Rust LinkedIn


Gitlab Project Doctor

A CLI tool to cleanup a Gitlab repository
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

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

Product Name Screen Shot

(back to top)

Getting Started

Installation

  1. Download the latest release for your OS
  2. Unzip and make gitlab-project-doctor executable
    chmod +x gitlab-project-doctor
  3. 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

  1. 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 .
  2. 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.

(back to top)

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).

(back to top)

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Geoffrey Arthaud - numerique-ecologie@developpement-durable.gouv.fr

Project Link: https://github.com/geoffreyarthaud/gitlab-project-doctor

(back to top)

Acknowledgments

(back to top)