forkcleaner

package module
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 5 Imported by: 0

README

fork-cleaner

Release Software License Travis Go Report Card Godoc SayThanks.io

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"

Fork-Cleaner will show you repos that:

  • are forks;
  • have no forks (customizable via --include-forked);
  • have no stars (customizable via --include-starred);
  • have no open pull requests to upstream;
  • had no activity in the last 1 month (customizable via --since);
  • are not private (customizable via --include-private,);
  • are not blacklisted (customizable via --blacklist).
  • are even with or behind the upstream repo (customizable via --exclude-commits-ahead).

fork-cleaner will list them and ask if you want to remove them! Simple as that.

Install

On macOS:

brew install fork-cleaner

On Linux:

snap install fork-cleaner

Or download one of the archives from the releases page.

Documentation

Overview

Package forkcleaner provides functions to find and remove unused forks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(
	ctx context.Context,
	client *github.Client,
	deletions []*github.Repository,
) error

Delete delete the given list of forks.

func Find

func Find(
	ctx context.Context,
	client *github.Client,
	filter Filter,
) ([]*github.Repository, []string, error)

Find list the forks from a given owner that could be deleted.

Types

type Filter added in v1.3.0

type Filter struct {
	Blacklist           []string
	Since               time.Duration
	IncludePrivate      bool
	IncludeStarred      bool
	IncludeForked       bool
	ExcludeCommitsAhead bool
}

Filter applied to the repositories list.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL