• Stars
    star
    107
  • Rank 321,716 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An interactive script to clean up GitHub environments

Github Environment Cleaner

Github does not have a way to delete environments from their UI so this script does it for you via their API. It can delete specific environments or all of your deployments interactively!

All you need to do is provide the repository name, the respository's owner, and an access token when prompted. You can get the access token by following these instructions. Make sure you give it repo_deployment permissions.

Note: The owner name will be a GitHub username if it is a personal repository and the organization name if the repository lives under an organization.

Getting Started

  1. Clone repository
git clone https://github.com/VishalRamesh50/Github-Environment-Cleaner.git
cd Github-Environment-Cleaner
  1. Install dependencies. Python version 3.6+ is required.
pip3 install -r requirements.txt
  1. Run the interactive script!
python3 delete_environment.py

If you would prefer not to be prompted for an owner, repo name, or access token follow these steps

  1. Copy the .env template to an actual .env file

    cp .env.example .env
  2. Enter whatever values you want inside this file to not be prompted for like this

    OWNER=
    REPO=
    TOKEN=your-github-token