Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

VCS push notification IRC bot

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 config.ru
README.md

RCMP

RCMP is a low-maintenance VCS push notification IRC bot with support for GitHub, Bitbucket and Travis CI.

Usage

RCMP accepts webhook POSTs on the following URLs:

  • /: Notification will be sent to default server and channel (see Configuration)
  • /:channel: Notification will be sent to :channel on default server
  • /:server/:channel: Notification will be sent to :channel on :server

For all endpoints, :channel is the channel name without the leading #. For channels with two leading hashes, the second must be URL encoded, i.e. %23. :server is either a server address (e.g. irc.freenode.net) or a server name/alias (e.g. freenode or fn). See Configuration for details.

All endpoints also accept the following query parameters:

  • key: The key of the channel to send the notification to

And the following query flags:

  • nojoin: Do not join the channel before sending the notification (channel must be -n for this to work)
  • part: Part the channel after sending the notification
  • notice: Send the notification using NOTICE

RCMP will not send notifications for commits with messages containing [irc skip].

GitHub

Add the WebHook URL to the Service Hooks in your repository's Settings.

Bitbucket

Add a POST Hook in your repository's Administration page.

Travis CI

Add the following to your project's .travis.yml:

notifications:
  webhooks:
    - http://rcmp.instance/server/channel

Sample output

<RCMP> programble/rcmp: master f234586 <http://git.io/LMlhbQ> Curtis McEnroe [README.md] Update documentation
<RCMP> programble/rcmp: master (11) <http://git.io/qbks9w>
<RCMP> ebd6793 Curtis McEnroe [lib/rcmp/config.rb lib/rcmp/irc.rb lib/rcmp/web.rb] Change format for configuring IRC servers
<RCMP> c3514e5 Curtis McEnroe [lib/rcmp/web.rb] Fix selecting server/channel from URI
<RCMP> 51f504b Curtis McEnroe [lib/rcmp/github.rb lib/rcmp/web.rb] Add payload source verification
<RCMP> programble/configru: master 88f6665 <http://da.gd/XcbB> build #68 passed

Set up

First, fetch the dependencies using Bundler:

bundle install

Start RCMP using Rack's rackup command.

Configuration

RCMP optionally redirects GET requests for / to the URL specified by the ROOT_REDIRECT environment variable.

RCMP loads server configuration from the YAML file specified in the CONFIG_FILE environment variable, or by default rcmp.yml.

The configuration file format is the following:

irc:
  servers:
    name:
      address: irc.example.com
      port: 6667 # optional
      nick: RCMP
      nickserv: password # optional
      alias: # optional
        - example
        - ex
    othername:
      # ...

The configuration file must contain at least one server named default, which will be the default destination for notifications. This server must also contain a channel option which will be the default channel for notifications. The default server can also contain key, nojoin, part and notice options that set the default query parameters for the default channel.

License

Copyright © 2011-2013, Curtis McEnroe programble@gmail.com

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Something went wrong with that request. Please try again.