Code Monkey home page Code Monkey logo

fork-sweeper's Introduction

fork-sweeper's People

Contributors

rednafi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fork-sweeper's Issues

Print a helpful message when the username doesn't exist

Currently, when you run:

fork-sweeper --owner doesnotexist --token $GITHUB_TOKEN

it prints:

Fetching repositories for doesnotexist...

Error fetching repositories: API request failed with status: 404

Return a more intuitive error message. I hate Go's error handling.

Protect repositories

Hello! Thank you for this nice tool, I wanted to do some cleanup in my forks but unfortunately I'd need some more features to use it.

There are many reasons a fork may need to stay even if it's old. Maybe a branch is unmerged and we're still working on it, maybe a PR is open waiting for a review.
It also appears that the tool only filters forks by their createdAt date.
I'm actively working on a fork and I regularly push commits & branches and they get merged regularly, so I don't want to delete this fork.

I suggest adding several features to make the tool useful to more people:

  • protecting some repositories manually, because we may want to keep them even if all other "protections" fail
  • protecting repositories based on last activity instead of creation date
  • protecting repositories based on open PRs in the upstream repo
  • protecting repositories based on unmerged branches (with recent activity?)

The output should mention clearly why a repo is being protected or if it's being deleted (or would be, in case the -delete flag is not provided).

Add a --timeout flag

Add a --timeout flag to timeout the operation. Also, provide a sensible default here.

Print a helpful message when the token doesn't have enough permission

If the GITHUB_TOKEN doesn't have enough permission to perform --delete it prints:

fork-sweeper --owner doesnotexist --token $GITHUB_TOKEN --delete
Deleting forked repositories...

Error deleting repositories: API request failed with status: 403

Turn it into a better error message. Go's error handling is lame!

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.