This hacky little project can be used to generate a nice looking table that shows how long PRs stay open in your organization on a repo by repo basis.
The heavy lifting is done by the https://github.com/rvesse/gh-pr-stats project.
This is what you will get:
Here's how to make it work:
- Clone this project
- Clone https://github.com/rvesse/gh-pr-stats and put pr-stats in your PATH (one way is
export PATH="$PATH:/path/to/gh-pr-stats") - Follow the instructions in https://github.com/rvesse/gh-pr-stats to setup tokens.
export GH_USER="yourusername"export GH_TOKEN="yourtoken"- ./get_stats.sh ORGANIZATION -o /tmp/pr-stats # Where ORGANIZATION is your GitHub organization name. This should generate one txt file per repo in /tmp/pr-stats.
- ./make_tsv.sh /tmp/pr-stats > /tmp/pr-stats.tsv
- Create a copy of this Google sheet
- Switch to the "source data" sheet. File -> Import -> choose the /tmp/pr-stats.tsv file and replace the data.
- The Pivot table on the first sheet should now contain summary stats of the services in your organization.
