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-agaric --stack cedar

Results in:

Creating ⬢ bishop-agaric... done, stack is cedar-14
https://bishop-agaric.herokuapp.com/ | https://git.heroku.com/bishop-agaric.git

heroku config:add BISHOP_API_KEY=tq79Rst0dkw7853 BISHOP_SERVER=irc.freenode.net BISHOP_CHANNELS=#example

Setting BISHOP_API_KEY, BISHOP_SERVER, BISHOP_CHANNELS and restarting ⬢ bishop-agaric... done, v3

BISHOP_API_KEY: tq79Rst0dkw7853
BISHOP_CHANNELS: ##agaric
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-agaric
2
3 # Changes to be committed:
4 # modified: lib/bishop/bot.rb

git push heroku

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>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

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