Calculate the bus factor for a repository
From Wikipedia:
In software development, a project's bus factor is the number of developers it would need to lose to destroy its institutional memory and halt its progress. It is [...] a measurement of the concentration of information in individual team members. A high bus factor means that many individuals know enough to carry on and the project could still succeed even in very adverse events.
"Getting hit by a bus" could take many different forms where the project would retain information (such as source code or other systems) with which no remaining team member is familiar with, including anything that suddenly and substantially prevented the individual from working on the project. This could be a person taking a new job, having a baby, changing their lifestyle or life status: the effect would be the same.
It's a pretty naive algorithm, to be honest. For each file, it calculates the owner of the file (the single contributor who has written the most lines in the file). Then, it simulates a bus hitting the contributors in order of most files owned. When 50% of the files are orphaned, it determines that the project is "dead"
Run with node index.js
Options:
Options:
-r, --repo Repository to scan [string] [required]
-t, --type Type of repository. Accepts "git", "svn", "hg", or "auto"
[string] [default: "auto"]
PRs accepted.
Apparently, due to a bug in Git for windows. Most error messages that can come from this tool actually come from the underlying source control product, and git has some really weird bugs on Windows. Sorry about that! It uses whatever's installed on your system, so if a patch fixes the underlying issue, this tool won't need an update.