mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
Accept zulip.com emails in post-commit hook
(imported from commit 783aec2bf0613ef962afa48614d56d3f81d54e38)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
AUTHOR=$(git log -1 HEAD | grep ^Author | sed 's/Author: //')
|
||||
if ! $(echo "$AUTHOR" | grep humbughq.com >/dev/null); then
|
||||
echo -e "\e[0;91m Invalid non-Humbug commit author: $AUTHOR\e[0m"
|
||||
if ! $(echo "$AUTHOR" | egrep '(humbughq|zulip)\.com' >/dev/null); then
|
||||
echo -e "\e[0;91m Invalid non-Zulip commit author: $AUTHOR\e[0m"
|
||||
fi
|
||||
COMMITTER=$(git log -1 HEAD --pretty=fuller | grep ^Commit: | sed 's/Author: //')
|
||||
if ! $(echo "$COMMITTER" | grep humbughq.com >/dev/null); then
|
||||
echo -e "\e[0;91m Invalid non-Humbug committer: $COMMITTER\e[0m"
|
||||
if ! $(echo "$COMMITTER" | egrep '(humbughq|zulip)\.com' >/dev/null); then
|
||||
echo -e "\e[0;91m Invalid non-Zulip committer: $COMMITTER\e[0m"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user