GitXplorerGitXplorer
y

delete-github-forks

public
211 stars
37 forks
3 issues

Commits

List of commits on branch master.
Verified
b0836334553a170692c3fb2f986bf99b4c9213ec

Bump follow-redirects from 1.15.4 to 1.15.6 (#22)

ddependabot[bot] committed 6 months ago
Verified
24989d02ada966b550de0b21f1c08e661f74f021

Bump follow-redirects from 1.14.8 to 1.15.4 (#20)

ddependabot[bot] committed 8 months ago
Unverified
ac089c95dd38593a0c5593e82de702e722ba3a0c

feat: improve UX

yyangshun committed 2 years ago
Unverified
6b4962e5a4e5b33f853eeda69eaac8d3807f2d0e

misc: add Prettier

yyangshun committed 2 years ago
Verified
217d4f6415895538722a4c21b5735954231856d3

Bump axios from 0.21.1 to 0.21.2 (#18)

ddependabot[bot] committed 2 years ago
Verified
06086ece3fd31e498a6d9f64c3a3ae5700747ed4

feat: add scripts in package.json for run npm commands (#15)

rrafnixg committed 2 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