Coder Social home page Coder Social logo

fork-cleaner's Introduction

fork-cleaner

Release Software License Travis Go Report Card Godoc Powered By: GoReleaser

Cleans up old and inactive forks on your GitHub account.

You'll need to create a personal access token with repo and delete_repo permissions.

Then, download the latest release and execute the binary as in:

./fork-cleaner --token "my github token" -u "my github username"

Fork-Cleaner will load your forked repositories ordered by the oldest first. This can take a little while as Fork-Cleaner will iterate over the page of forks and check the upstream repository status / any prs etc.

Fork-Cleaner will show you all your forks, you can then check which you want to delete or not on a TUI:

Screen Recording

Setting -skip-upstream=true will skip checking each repositories upstream (useful if you have a lot of forks to avoid hitting the rate-limit). This won't compare upstream commits, fetch upstream issues/prs, etc.

Install

homebrew:

brew install caarlos0/tap/fork-cleaner

snap:

snap install fork-cleaner

apt:

echo 'deb [trusted=yes] https://repo.caarlos0.dev/apt/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
sudo apt update
sudo apt install fork-cleaner

yum:

echo '[caarlos0]
name=caarlos0
baseurl=https://repo.caarlos0.dev/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/caarlos0.repo
sudo yum install fork-cleaner

deb/rpm/apk:

Download the .apk, .deb or .rpm from the releases page and install with the appropriate commands.

manually:

Download the pre-compiled binaries from the releases page or clone the repo build from source.

Troubleshooting

  • The loading takes a while - The app hits various endpoints in order to collect information on the upstream repository, this can take a while if you have a lot of forks.
  • I've hit the rate limit - You can check your current limits by calling the api like so:
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/rate_limit

Stargazers over time

Stargazers over time

fork-cleaner's People

Contributors

caarlos0 avatar dependabot[bot] avatar dependabot-preview[bot] avatar chrismckee avatar mikemcquaid avatar jakewarren avatar ilmanzo avatar bfontaine avatar rwhogg avatar meowgorithm avatar dieterbe avatar the-compiler avatar happyfacade avatar j178 avatar mar10p avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.