GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - CodeWithEmad/gh-fork-cleanup: GitHub CLI extension to help you clean up your fork repositories

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 
scanner.go
scanner.go
 
 
types.go
types.go
 
 

Repository files navigation

GitHub Fork Cleanup

๐Ÿงน A GitHub CLI extension that helps you clean up your forked repositories through an interactive interface.

demo

Features

  • ๐Ÿ” Detects and warns about forks with open pull requests
  • ๐Ÿ”„ Shows commit comparison with parent repository
  • ๐Ÿ“ฆ Identifies archived repositories
  • ๐Ÿ“… Shows last update time for each fork
  • โœจ Interactive yes/no prompts for each repository
  • ๐Ÿ”’ Safe deletion process using GitHub CLI
  • ๐ŸŒ Open fork URLs directly in your browser

Installation

First, make sure you have the GitHub CLI installed and authenticated.

# Install the extension
gh extension install CodeWithEmad/gh-fork-cleanup

Important

Your GitHub token must have the delete_repo scope to delete forks. If you're using GitHub CLI's built-in authentication, ensure this scope is included. To add the scope to your existing token, run:

gh auth refresh -h github.com -s delete_repo

Usage

Simply run:

gh fork-cleanup [--force|-f] [--skip-confirmation|-s]

Options:

  • --force, -f: It will automatically delete all forks. Be careful when using this option.
  • --skip-confirmation, -s: Skip the extra confirmation step for forks with open pull requests.

The extension will:

  1. Show a loading spinner while fetching your forks
  2. Check for any open pull requests from your forks
  3. List all your forked repositories with their last update times
  4. Warn you about forks that have open pull requests
  5. Ask if you want to delete each fork
  6. Process your choice (delete or skip)

Development

  1. Fork and clone the repository

    gh repo fork CodeWithEmad/gh-fork-cleanup # or just use Github website
    [email protected]:YOUR_USERNAME/gh-fork-cleanup.git
  2. Make your changes to the code

  3. Build the executable

    go build -o gh-fork-cleanup

and enjoy hacking!

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

MIT License - feel free to use and modify this code for your own projects.

About

GitHub CLI extension to help you clean up your fork repositories

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402520 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.