hackety tool to view github PRs for a period
-
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 by clicking the Authorize button within the Enable SSO dropdown
- 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
Usage: python3 gh_perf_review.py ORG YEAR PERIOD [--user USER] [--involves INVOLVES]
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--api-root API_ROOT
: optional, will use https://api.github.com by default--user USER
: optional, will use the authenticated user otherwise--involves INVOLVES
: optional, will filter for reviews involving this reviewer
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