Code Monkey home page Code Monkey logo

rotten's Introduction

Rotten — find empty git branches and unmerged ones with tons of code!

$ npm -g install rotten

It helps you discover

  • Which remote branches are empty (all code is in master), also outputs a command to delete them all.
  • Which remote branches still have lots of code that needs to be merged
  • How long remote branches have been waiting to be merged.

Why is this useful?

  • discover which projects are languishing
  • discover which engineers are unhappy that their code is not being reviewed/merged
  • discover how effective your development process is

How rotten am I really?

Try it out.

$ npm -g install rotten
$ cd my-big-git-repo
$ rotten

Usage

Usage: rotten --repo /path-to-git-repo --prod master

Options:
  -r, --repo         the repo youd like to examine for rotting code                                        [default: "."]
  -p, --prod         the branch you have running in production                                             [default: "master"]
  --keep             don't run "harvested" checks (if you want to keep merged branches)                    [default: false]
  -c, --mostcommits  show branches with the most commits first (defaults to showing oldest commits first)  [default: false]

If you'd like to order by most commits waiting (instead of oldest commit waiting):

$ rotten --mostcommits

Scoring?

Your rotten score is #rotten:13/harvested:37

Explanation:

  • rotten: number of branches you need to merge into prod
  • harvested: branches already in prod that need to be deleted.

rotten's People

Contributors

dtrejo avatar ljharb avatar kornelski avatar inkel avatar

Stargazers

Christian Fuchs avatar David Trejo avatar Jeff Kolesky avatar Oleg Efimov avatar Remy Schrader avatar Luke Steensen avatar albert avatar Nick Aldwin avatar Denis Denisov avatar Paul Love avatar Jonathan Barratt avatar Anusch Athari avatar Matt Brandly avatar Joseph Lisee avatar Nick Fargo avatar  avatar Oli avatar Alex Worrad-Andrews avatar Scott Walkinshaw avatar Leonardo Mosquera avatar Eric avatar Andy Freeland avatar Seb avatar Luís Couto avatar Steve Phillips avatar chris avatar Jason J. Gullickson avatar Kenneth Lee avatar Glen Stampoultzis avatar  avatar Martin Trejo avatar Andy Sloane avatar Brandon Harris avatar Derek avatar Ron DeVera avatar B.J. Allen avatar

Watchers

 avatar  avatar James Cloos avatar  avatar

Forkers

igort inkel n2taylor

rotten's Issues

Use correct remote name for delete text

The remote name is always origin for the "==Paste the following to delete them all==" section. It should use the correct remote name for each branch in the list.

sh Error On Running

› rotten --prod develop 
Checking that branches are in production branch develop
.
 Error: Command failed: /bin/sh: origin/master: No such file or directory

    at onBranch (/usr/local/share/npm/lib/node_modules/rotten/rotten.js:65:36)
    at ChildProcess.exithandler (child_process.js:544:7)
    at ChildProcess.EventEmitter.emit (events.js:99:17)
    at maybeClose (child_process.js:638:16)
    at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
    at Socket.EventEmitter.emit (events.js:96:17)
    at Socket._destroy.destroyed (net.js:357:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
............
  origin/refactor/ui-fixes all in prod, please delete remote branch
  origin/refactor/tests-fix all in prod, please delete remote branch
  origin/refactor/rename-to-pp all in prod, please delete remote branch
  origin/refactor/remove-profiler all in prod, please delete remote branch

etc etc all okay.

Running Rotten against http://github.com/unikent/programmes-plant

Might be a local problem. Seems to otherwise work.

Cheers!

git branches not deleting

this is caused by

  • the branch is deleted on the remote
  • the local branch is also deleted
  • but the local repo still has a ref to the remote branch

The solution is

  • git branch -r -d origin/branchname

This should be output in the commands.

quits with no logging

David,

Any idea why this isn't working? I get no logging.

tiny:~/voxer/server$ (release) rotten -p release
Running against /Users/kip/voxer/server
Checking that branches are in production branch release
....................................tiny:~/voxer/server$ (release)

@rv-kip

paste text always uses the same remote

I've got a bunch of branches from remote "upstream" and remote "origin". The "please delete remote branch" section displays the correct remote + branch pairs, but the "Paste the following text to delete them all!" section uses the "origin" remote for all of them.

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.