Quantcast
Channel: Open Data - bot
Viewing all articles
Browse latest Browse all 3

Adding Git projects to the KGB bot

$
0
0
Searched words: 
IRC channel notifications, alerts by KGB robot for git commits pushed to agaric repository

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

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images