Giter VIP home page Giter VIP logo

gitlab-irc's Introduction

gitlab-irc

Notice: if you're looking for an IRC Bot (idling in your channel, taking commands etc.) take a look at my other project: gitlab-cinch-bot.

Tiny Sinatra App that takes POST Calls from Gitlab Web Hooks and pushes them in your IRC Channel of choice.

22:59 < GitLabBot> New Commits for 'repo-name'
22:59 < GitLabBot> by Aleks | Got shit done | http://yourgitlabhost.com/repo-name/commits/f9cbbe01c....
22:59 < GitLabBot> by Aleks | Got even more shit done | http://yourgitlabhost.com/repo-name/commits/f9cbbe01c....

Install Sinatra

gem install sinatra

Configure

Set IRC settings in gitlab-irc.rb

# IRC Config
IRC_HOST = 'irc.freenode.org'
IRC_PORT = 6667
IRC_CHANNEL = '#yourchannel'
IRC_NICK = 'GitLabBot'
IRC_REALNAME = 'GitLabBot'

Launch

ruby gitlab-irc.rb

You should see output like this:

» ruby gitlab-irc.rb  
== Sinatra/1.3.3 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop

Enable Web Hook Support in your GitLab Repository

Every Gitlab repository can have individual Web Hooks. Copy your gitlab-irc address http://xxx.xxx.xxx.xxx:4567/commit and set it for every Repository that should send notifications to your IRC channel.

Run in Background

To keep gitlab-irc running, you should start it in some kind of background task. A good choice would be tmux or screen.

If you want to configure the webserver port, take a look at the Sinatra Documentation. You can also run it like any other Sinatra app.

gitlab-irc's People

Contributors

aleks avatar carlasouza avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.