Send gitlab.com commit message to IRC
There is sadly no default way to do this directly from GitLab.com— but there's a pretty simple way, with Bishop:
Install Heroku locally. These instructions from https://devcenter.heroku.com/articles/getting-started-with-ruby#set-up worked great for me:
sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install heroku
Then:
heroku apps:create bishop-example --stack cedar
Results in:
Creating ⬢ bishop-example... done, stack is cedar-14
https://bishop-example.herokuapp.com/ | https://git.heroku.com/bishop-example.git
heroku config:add BISHOP_API_KEY=dc83Pzn2foy4039 BISHOP_SERVER=irc.freenode.net BISHOP_CHANNELS=#example
Setting BISHOP_API_KEY, BISHOP_SERVER, BISHOP_CHANNELS and restarting ⬢ bishop-example... done, v3
BISHOP_API_KEY: dc83Pzn2foy4039
BISHOP_CHANNELS: #example
BISHOP_SERVER: irc.freenode.net
git push heroku master
(Note: The heroku app adds heroku as a remote repository all on its own.)
And, this is critical:
heroku config:add BISHOP_GITLAB_HOOK_CHANNELS=#example
We hacked it to rename the bot to bishop-example
2
3 # Changes to be committed:
4 # modified: lib/bishop/bot.rb
git push heroku
Now, to a GitLab repository, under settings/integrations, add a webhook:
https://bishop-example.herokuapp.com/hooks/gitlab/dc83Pzn2foy4039
Comments
Post new comment