Add script to mail inactive maintainers
This commit is contained in:
parent
0175bb7014
commit
d1321e2ba9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
*~
|
||||
/.mail.list
|
||||
/systemd-*/
|
||||
/.build-*.log
|
||||
/x86_64/
|
||||
|
36
owner-check.sh
Executable file
36
owner-check.sh
Executable file
@ -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 <owner-check.template
|
20
owner-check.template
Normal file
20
owner-check.template
Normal file
@ -0,0 +1,20 @@
|
||||
Dear $USER$,
|
||||
|
||||
the automation to check activity in the systemd dist-git repo [1]
|
||||
determined that you haven't done any commits in the last two years.
|
||||
|
||||
To decrease the potential for unauthorized access, such checks will be
|
||||
executed periodically. Not-used accounts with write access to the repo
|
||||
will be downgraded to "ticket" (no write privileges).
|
||||
|
||||
If you want to retain access, please reply to this mail.
|
||||
Otherwise, in two weeks, your access mode will be changed to "ticket".
|
||||
Even without write access, anyone can open a pull request in pagure,
|
||||
so write access is not necessary to contribute to the package.
|
||||
Obviously such changes not permanent, so even if your access mode is
|
||||
downgraded, it can easily be restored later on.
|
||||
|
||||
Yours friendly,
|
||||
./owner-check.sh
|
||||
|
||||
[1] https://src.fedoraproject.org/rpms/systemd
|
Loading…
Reference in New Issue
Block a user