From ea3795879da3502b14577144466ff9d35d4eb358 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 31 May 2017 20:07:07 +0200 Subject: Add script to list all LEAP contributors --- get_contributors.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 get_contributors.sh diff --git a/get_contributors.sh b/get_contributors.sh new file mode 100755 index 0000000..175ecc4 --- /dev/null +++ b/get_contributors.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Script to generate a list of contributors + +REPOS=(bitmask_android bitmask_client bitmask-dev bonafide couchdb_scripts couchrest_changes deploy_test dl_bitmask_net docker faith Infrastructure junit keymanager leap_assets leap_ca leap_cli leap_client_dist leap_client_launcher leap_cloudadmin leap_db leap_mail leap_mx leap_pistonadmin leap_platform leap_platform_gource leap_presentations leap_pycommon leap_se leap_vagrant leap_web leap_website lut mail_breaker minimal-debian-vagrant nickserver platform_test pysqlcipher reserve_usernames ruby_srp scripts soledad tapicero ) + +# shellcheck disable=SC2016 +GET_CONTRIBUTORS='git log --use-mailmap --format="%aN <%aE>" | awk "{arr[\$0]++} END{for (i in arr){print arr[i], i;}}" | sort -rn | cut -d" " -f2- | sort' +ROOTDIR="${HOME}/leap/git" +LISTFILE='/tmp/contributors.txt' + +# optional specify core team memebers to filter out +TEAM='(email@of.contributor.org|email@of_other_contributor.net)' + +[ -e ${LISTFILE} ] && rm ${LISTFILE} +[ -e ${LISTFILE}.tmp ] && rm ${LISTFILE}.tmp + +for repo in "${REPOS[@]}" +do + cd "${ROOTDIR}/${repo}" || exit 1 + contributors=$(eval "$GET_CONTRIBUTORS" | egrep -iv "$TEAM") + if [ -n "$contributors" ] + then + echo "${repo}:" + echo "$contributors" | tee -a ${LISTFILE}.tmp + echo + echo + fi +done + + +sort < "${LISTFILE}.tmp" | uniq > "${LISTFILE}" +rm "${LISTFILE}.tmp" +echo "Complete list of contributors is at ${LISTFILE}" -- cgit v1.2.3