You've got a lot of repos. Like, thousands. Some of them probably aren't used any more, or never were. How do you find the dead weight?
Github's API is not informative enough to help you, so these scripts will:
- Retrieve the full list of repos in your Github organization.
- Clone them all locally, and checkout whichever branch has the latest commit.
- Assign a weight ("heat") to each repo for how likely it is to be useless, and aggregate those stats into a CSV file for ease of cajoling your coworkers.
- Clone this repo to somewhere with lots of space.
- Have jq somewhere on your PATH, or inside this dir.
- Set environment variables
GITHUB_ORG
andGITHUB_TOKEN
./do_everything.sh
The code will clone all repos to ./repos
, and generate data files in ./stats/TODAY/TODAY.csv
.
- Pass "created_at" through the pipeline
- Move the "ignore recently-created repos" code into make_staleness_stats.sh so all stats options are in one place
- Create a whitelist facility
- Support stdin/out