Skip to content

EdenBlockVC/fork-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fork cleanup

⚠️ This project does destructive actions on your GitHub profile. Use at your own risk. ⚠️

This is a simple script to delete your forked repositories which have no additional commits. Because GitHub introduced additional limits to the free accounts, it makes sense to do some housekeeping.

Setup

  1. Create a personal access token with these permissions:

Personal access token permissions

  • Administration: Read and write
  • Commit statuses: Read-only
  • Contents: Read-only
  • Metadata: Read-only
  • Pull requests: Read-only
  1. Add the token to your .env file as GITHUB_ACCESS_TOKEN.

  2. Create a local virtual environment and install the requirements:

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
  1. Run the script to see what repositories would be deleted:
$ python main.py
Logged in with cleanunicorn
Can delete cleanunicorn/forge-std
  1. This is a destructive action. If you really want to delete the repositories, add the --delete flag:
$ python3 main.py --delete
Logged in with cleanunicorn
This will delete forks with no commits from the authenticated user. Are you sure? (y/n)
y
Deleting cleanunicorn/forge-std
Total forks:  32
Total forks with no commits by the authenticated user:  1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages