Restructure
[gitolite-hooks.git] / post-receive
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3aeae3572f0315bbad6453a8416b2f0705d74134 100755 (executable)
@@ -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