User login

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:

https://github.com/ta/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

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.