From c6d0425020379cb353eb6375ebc829b35ec35e24 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 15 Jan 2020 20:34:10 +1000 Subject: [PATCH] basic anti spam protection --- .github/scripts/contrib.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/scripts/contrib.sh b/.github/scripts/contrib.sh index 8ae2aed0a..7ba00acba 100755 --- a/.github/scripts/contrib.sh +++ b/.github/scripts/contrib.sh @@ -2,13 +2,16 @@ set -e +antispam=", at the domain " + echo "All contributors:" -git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f +git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f | sed "s/@/$antispam/" headAuthor=$(git log -1 --pretty=format:'%ae') +authorAt=$(echo "$headAuthor" | sed "s/@/$antispam/") if git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"; then - echo "Author $headAuthor found in CONTRIBUTORS" + echo "Author $authorAt found in CONTRIBUTORS" else - echo "Author $headAuthor NOT found in list" + echo "Author $authorAt NOT found in list" exit 1 fi