X-Git-Url: https://git.ctpug.org.za/?p=gitolite-hooks.git;a=blobdiff_plain;f=post-receive;fp=post-receive;h=3aeae3572f0315bbad6453a8416b2f0705d74134;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hb=ceceb3aa1d5209d2015a2acb55486ce70436e2a6;hpb=be0a5404034731b70a08addaa0f96b53e3d1b7d3 diff --git a/post-receive b/post-receive index e69de29..3aeae35 100755 --- a/post-receive +++ b/post-receive @@ -0,0 +1,23 @@ +#!/bin/bash +HOOKDIR=$(dirname $0) + +# Load functions +. $HOOKDIR/irker +. $HOOKDIR/slack + + +channels=$(git config --get irker.channels) + +webhook_url=$(git config --get hooks.slack.webhook-url) + +while read line; do + set -- $line + if [ -n "$channels" ]; then + notify_irker $* + fi + if [ -n "$webhook_url" ]; then + notify_slack $* + fi + RET=$? +done +exit $RET