User login

Adding Git projects to the KGB bot

Stefan set up the kgb-bot to post in the Agaric IRC channel when anyone pushes a commit to one of our repositories. These repositories are hosted on our server, and each one needs to have a very simple bit of configuration added to it and to the KGB server configuration when we add one.

Here's the easiest way for me to do that. For information about getting started with KGB in the first place, see http://www.donarmstrong.com/posts/switching_to_kgb/

Copy the post-receive hook from an existing repository:

ssh agaric-git
$ cd /srv/git/
/srv/git$ cp existing.git/hooks/post-receive new.git/hooks/

Edit it to have the name of your repository:

/srv/git$ vi new.git/hooks/post-receive

/usr/bin/kgb-client --git-reflog - --conf /etc/kgb-client/kgb.conf --repository git --repo-id new

Then edit the kgb.conf file in two places to have that repository-- once with the password (which you can leave the same as all the others), and once under the IRC channel you want to have alerted.

$ sudo vi /etc/kgb-bot/kgb.conf

Finally, restart the bot.

$ sudo /etc/init.d/kgb-bot restart
Searched words: 
IRC channel notifications, alerts by KGB robot for git commits pushed to agaric repository

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.