Skip to content

VishalRamesh50/Github-Environment-Cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An interactive script to clean up GitHub environments

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published