gitlab5でpush時にメールする
gitlab良いですね。version5になってgitlab-shellになりました。
なのでファイルの場所がちょっと変わりますね。
http://d.hatena.ne.jp/akishin999/20120702/1341193098
を参考に設定。ubuntu12環境
sudo su su - git git config --global hooks.mailinglist 送信する@メールアドレス git config --global hooks.showrev "git show -C %s; echo"
/usr/share/git-core/contrib/hooks/post-receive-emailを設定
#720行目あたり #projectdesc=$(sed -ne '1p' "$GIT_DIR/description" 2>/dev/null) projectdesc=$(basename $(pwd) .git)
/home/git/gitlab-shell/hooks/post-receiveを設定
#!/usr/bin/env bash # This file was placed here by Gitlab. It makes sure that your pushed commits # will be processed properly. . /usr/share/git-core/contrib/hooks/post-receive-email #<= 追記 while read oldrev newrev ref do # For every branch or tag that was pushed, create a Resque job in redis. pwd=`pwd` reponame=`basename "$pwd" | cut -d. -f1` env -i redis-cli rpush "resque:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$reponame\",\"$oldrev\",\\ "$newre