Skip to content

VenkataRam-DevOps/RepoCleaner

Repository files navigation

repoCleaner

repoCleaner is a utility that helps clean up stale branches from repositories on GitHub. It automatically identifies branches that haven't had a commit in over a year, prompts the user for deletion approval, and deletes the branches that the user selects.

Features

  • Identifies stale branches in GitHub repositories.
  • Allows users to select branches for deletion.
  • Provides an executive summary after cleanup.
  • Supports error recovery and resume functionality in case of failure.

Setup

  1. Clone the repository:

    git clone https://github.com/username/repoCleaner.git
    cd repoCleaner
    
  2. Install Dependencies: pip install -r requirements.txt

  3. Create a GitHub Personal Access Token:

Go to GitHub → Settings → Developer settings → Personal access tokens → Generate new token. Ensure the token has repo scope

  1. Update the script with your GitHub token:

In repoCleaner.py, replace your_github_token_here with your generated GitHub token.

  1. Update Masterreposfile

  2. Run the utility

  3. python repoCleaner.py
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages