gh-perf-review
hackety tool to view github PRs for a period
setting up a token
-
Create a gh token on the settings tab
- use
repo
scope if you need private repos, otherwisepublic_repo
- if your org is protected by SSO, make sure to enable that for the token
- use
-
Write out the settings file needed for this script
echo '{"token": "TOKEN HERE"}' > .github-auth.json chmod 600 .github-auth.json "${EDITOR:-vim}" .github-auth.json
generating markdown output
Usage: python3 gh_perf_review.py ORG YEAR PERIOD [--user USER]
ORG
: the github organization to search inYEAR
: the four digit year to search inPERIOD
: the time period to search in, currently supported: Q1, Q2, Q3, Q4, H1, H2, Y--user USER
: optional, will use the authenticated user otherwise
The script writes its output to stdout, if you'd like to capture that, redirect it to a file:
python3 gh_perf_review.py pre-commit 2018 Q4 > report.md
If you'd like to convert it to html, one such tool is markdown-code-blocks.
python3 gh_perf_review.py pre-commit 2018 Q4 |
markdown-code-blocks-highlight /dev/stdin |
sed 's|<body>|<head><style>td, th { padding: 5px; border: 1px solid #000; }</style></head><body>|g' > report.htm