This is a hacky solution to get some stats about Carvel repos. At this time, it returns the following information:
- by repo
- Number of Total PRs
- Number of Filtered PRs (within the provided timeframe)
- aggregate
- Number of Filtered PRs (within the provided timeframe)
- Sorted list of PRs by Time To Engagement (ascending order)
- Median Time To Engagement for Filtered PRs
- clone the repo
- set the required environment variables:
GITHUB_API_TOKEN
,BEGIN_DATE
,END_DATE
- to generate a GitHub API Token, follow these instructions. Only read permissions are needed.
- run
Example:
GITHUB_API_TOKEN="notatoken" BEGIN_DATE="2022-01-29T00:00:00-08:00" END_DATE="2022-04-29T23:59:59-08:00" go run main.go
-
set environment variables:
export GITHUB_API_TOKEN="notatoken" export BEGIN_DATE="notadate" export END_DATE="notadate" export REPORT_OUTPUT="fy23q1.out" export CONTRIBUTORS_OUTPUT="fy23q1contributors.out"
-
run the report and save the results:
go run main.go > "${REPORT_OUTPUT}"
-
get contributors:
cut -d' ' -f 6 "${REPORT_OUTPUT}"| sort | uniq -c | sort -r > "${CONTRIBUTORS_OUTPUT}"
-
manually filter contributors by adding
(non-VMW)
to the end of any non-VMware contributors -
process contributor metrics
- For total # of contributors:
wc -l "${CONTRIBUTORS_OUTPUT}"
- For total # of non-VMW contributors:
grep non-VMW "${CONTRIBUTORS_OUTPUT}" | wc -l
- For total # of non-VMW contributions (manually add):
grep non-VMW "${CONTRIBUTORS_OUTPUT}"
- For total # of contributors: