X-Git-Url: https://git.ctpug.org.za/?p=gitolite-hooks.git;a=blobdiff_plain;f=slack;h=a8055eb6fb5a8ad2682408bee76d66682e45c018;hp=45187cfe5b92ecd069760d374cc161d4f227fadb;hb=HEAD;hpb=1cc17151cd42cd4073c4ed59a9888baddb1492fd diff --git a/slack b/slack old mode 100644 new mode 100755 index 45187cf..a8055eb --- a/slack +++ b/slack @@ -8,7 +8,7 @@ # Based on post-receive.irc by Mikael Fridh https://gist.github.com/1821358 # -function help() { +function help_slack() { echo "Required config settings:" echo " git config hooks.slack.webhook-url 'https://hooks.slack.com/services/...'" echo " git config hooks.slack.channel 'general'" @@ -233,16 +233,3 @@ function notify_slack() { "$webhook_url" \ >/dev/null } - -webhook_url=$(git config --get hooks.slack.webhook-url) - -while read line; do - set -- $line - if [ -n "$webhook_url" ]; then - notify_slack $* - fi - - RET=$? -done - -exit $RET