Files
zulip/tools/post-commit
Scott Feeney 1e8881d21a Accept zulip.com emails in post-commit hook
(imported from commit 783aec2bf0613ef962afa48614d56d3f81d54e38)
2013-07-23 14:50:39 -04:00

10 lines
446 B
Bash
Executable File

#!/bin/bash
AUTHOR=$(git log -1 HEAD | grep ^Author | sed 's/Author: //')
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" | egrep '(humbughq|zulip)\.com' >/dev/null); then
echo -e "\e[0;91m Invalid non-Zulip committer: $COMMITTER\e[0m"
fi