GitXplorerGitXplorer
y

delete-github-forks

public
211 stars
37 forks
3 issues

Commits

List of commits on branch master.
Verified
bcf590b415a30b44d8bb4b580fb6efefb707537e

Bump follow-redirects from 1.13.1 to 1.14.8 (#17)

ddependabot[bot] committed 3 years ago
Verified
acc8134bca48710b0e6957008b7d372d8eda498c

headers set Authentication、Accept,deletion file use header auth (#14)

aakazhuo committed 3 years ago
Verified
f0634add18d5caaff7111a7d13404cd18a134b34

Use Authorization header to fetch repos (#13)

aakazhuo committed 3 years ago
Verified
154bda668085153470e8402fb7c70da953b2f27e

Bump axios from 0.18.1 to 0.21.1 (#11)

ddependabot[bot] committed 4 years ago
Unverified
7802d1b5f2876f78b829996e7ba8843f4b015881

Bump axios from 0.16.2 to 0.18.1 (#7)

ddependabot[bot] committed 5 years ago
Verified
59c45567fac0f757234791efde6e68af2b53af96

Merge pull request #2 from schulzh/master

yyangshun committed 6 years ago

README

The README file for this repository.

Delete GitHub Forks

Delete your forked GitHub repositories easily in two steps (takes less than 5 minutes).

Motivation

Deleting GitHub repositories via the GitHub interface is a hassle; you have to enter your password followed by the name of the repository. This is not scalable if you contribute to open source a fair bit and have many forked repositories that you may not necessarily want to keep.

Using these scripts, you can fetch a list of your GitHub repositories and delete all the unwanted repositories in one go.

Getting Started

Clone this repository.

$ npm install
$ cp src/config.json.example src/config.json

Add your GitHub username and access token to config.json. To get the access token, go to this page and create a token that has the following permissions: public_repo and delete_repo.

Usage

Firstly, run the following command to fetch all your forked repositories.

$ npm run fetch # Writes to a src/repos.json file

A JSON file, src/repos.json containing an array of your repositories will be written into the same directory. Manually inspect it and remove the forked repositories that you want to keep. The repositories that remain inside src/repos.json will be deleted on the next command. It is an irreversible operation. Use with great caution!.

$ npm run delete # Reads from src/repos.json and deletes the repos inside it.

And all the repositories within src/repos.json will be deleted! It's that easy.

The scripts can be potentially modified to work on an organization's repositories as well just by changing the URLs. Pull requests to support this feature are welcome.

License

MIT