mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
basic anti spam protection
This commit is contained in:
parent
967b8a038d
commit
c6d0425020
1 changed files with 6 additions and 3 deletions
9
.github/scripts/contrib.sh
vendored
9
.github/scripts/contrib.sh
vendored
|
@ -2,13 +2,16 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
antispam=", at the domain "
|
||||||
|
|
||||||
echo "All contributors:"
|
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')
|
headAuthor=$(git log -1 --pretty=format:'%ae')
|
||||||
|
authorAt=$(echo "$headAuthor" | sed "s/@/$antispam/")
|
||||||
if git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"; then
|
if git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"; then
|
||||||
echo "Author $headAuthor found in CONTRIBUTORS"
|
echo "Author $authorAt found in CONTRIBUTORS"
|
||||||
else
|
else
|
||||||
echo "Author $headAuthor NOT found in list"
|
echo "Author $authorAt NOT found in list"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue