Coder Social home page Coder Social logo

remove-github-forks's Introduction

Clean your useless GitHub forks

npm npm Build Status Code Climate Codacy Badge bitHound Score Dependency Status

Developers that contribute to many projects on GitHub, have their profiles full of meaningless temporary forks. If a particular pull request has not been closed yet, keeping the fork is useful to modify that fork by pushing to the branch in question. Once the pull request has been closed, though, there is hardly any value remaining in having the fork on one's profile. This package will delete all forks on one's profile that have no unique commits.

Usage

To allow the library access to a GitHub account, one needs an OAuth token. Create a new token with permissions public_repo, delete_repo. (include repo as well if you want to allow access to private repositories), and pass it to the library.

Install

$ [sudo] npm install --global remove-github-forks

Run

$ remove-github-forks token
? Will delete: user/repo, user/repo2 <yes|no>: yes
Done!

Warning! Your shell will likely store your command history in a plain-text file such as .bash_history. As a quick workaround, consider adding a space in front of your command for it to not be stored:

$ <space>remove-github-forks token

If you want to do this often and are happy with saving the token in plain-text, add an alias to your .bashrc:

alias clean-github='remove-github-forks YOUR-TOKEN'

Options

--user <userOrOrganization> will only clean repositories for the user or organization provided, without touching repositories for organizations you are in.

API

Main usage to delete useless forks:

var clean = require('remove-github-forks');
clean(token, function(err){});

Advanced usage:

// Get a list of repositories that are useless
// repos is a list of {user, repo, url} objects
clean.get(token, function(err, repos){});

// Delete repositories
// repos is a list of {user, repo} objects
clean.remove(token, repos, function(err){});

remove-github-forks's People

Contributors

bfred-it avatar denis-sokolov avatar greenkeeperio-bot avatar hemanth avatar johnantoni avatar paulirish avatar waldyrious avatar

Watchers

 avatar  avatar  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.