From d1321e2ba985724da474b9155153b5f8c21b103e Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Feb 11 2021 12:08:32 +0000 Subject: Add script to mail inactive maintainers --- diff --git a/.gitignore b/.gitignore index 911034e..6cf7897 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *~ +/.mail.list /systemd-*/ /.build-*.log /x86_64/ diff --git a/owner-check.sh b/owner-check.sh new file mode 100755 index 0000000..7086238 --- /dev/null +++ b/owner-check.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -e + +[ -z "$server" -o -z "login" ] && { echo '$server and $login need to be set'; exit 1 } + +header= +from=systemd-maint@fedoraproject.org +time='2 years ago' +# time='1 day ago' +port=587 + +for user in "$@"; do + echo "checking $user…" + t=$(git shortlog --all --author $user --since "@{$time}" | wc -l) + if [ $t != 0 ]; then + echo "$t commits in the last two years, OK" + continue + fi + + if [ -z "$header" ]; then + echo '$USER$;$EMAIL$' >.mail.list + header=done + fi + + echo "$user;$user@fedoraproject.org" >>.mail.list +done + +[ -z "$header" ] && exit 0 + +echo "Sending mails…" +set -x +massmail -F $from \ + -C $from \ + -S 'write access to the fedora systemd package' \ + -z $server -u $login -P $port \ + .mail.list