Skip to content

Instantly share code, notes, and snippets.

@dims
Created April 8, 2019 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dims/3261edf075660ad1bf5c338b8794c21b to your computer and use it in GitHub Desktop.
Save dims/3261edf075660ad1bf5c338b8794c21b to your computer and use it in GitHub Desktop.
Use the Developer Activity Counts by Repository Group dashboard to find stale reviewers and approvers
#!/bin/bash
if [[ ! -f "grafana_data_export.csv" ]]; then
echo "Please run 'Export CSV"
echo "from https://k8s.devstats.cncf.io/d/13/developer-activity-counts-by-repository-group?orgId=1&var-period_name=Last%20year&var-metric=contributions&var-repogroup_name=All&var-country_name=All"
echo "and save the contents to grafana_data_export.csv before running this script"
exit
fi
(cat OWNERS_ALIASES && find . -name OWNERS -exec cat {} \;) | grep -e "^-" -e " - " | cut -f 2- -d '-' | sort | grep -v -e "sig-" -e "\-approvers" -e "\-reviewers" -e "sig/" -e "area/" -e "kind/" | cut -f 1 -d '#' | sed "s|'||g" |sed 's/\x20//g' | uniq | sort > uniq.txt
while read line; do
if ! grep -i -q "${line}" grafana_data_export.csv ; then
echo " @$line : no activity in last year"
fi
done <uniq.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment