Restructure
[gitolite-hooks.git] / slack
diff --git a/slack b/slack
index 45187cfe5b92ecd069760d374cc161d4f227fadb..ac6e1143f7cc8e5a79fe9d74235c7860dedcbc6f 100755 (executable)
--- a/slack
+++ b/slack
@@ -8,7 +8,7 @@
 # Based on post-receive.irc by Mikael Fridh <frimik@gmail.com> 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'"
@@ -22,6 +22,9 @@ function notify_slack() {
   newrev=$(git rev-parse $2)
   refname="$3"
 
+   echo "slack $1 $2 $3"
+   return
+
   # --- Interpret
   # 0000->1234 (create)
   # 1234->2345 (update)
@@ -233,16 +236,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