Skip to content

GitHub Web Hook Sink

Innocent Bystander edited this page Aug 17, 2015 · 3 revisions

The GitHub-compatible sink will post push messages into a Hangout

configuring and starting the sink

  1. Generate a .pem file for SSL/TLS. This is a mandatory step as the sink will refuse to start without SSL/TLS. A self-signed certificate will do:

  2. Open the bot's config.json file and modify the jsonrpc key as follows:

    ...,
    "jsonrpc": [
      {
        "module": "sinks.github.simplepush.webhookReceiver",
        "certfile": "<location of .pem file>",
        "port": <port number>
      }
    ],
    ...
    
  3. (Re-)start the bot

configuring GitHub

  1. Determine which conversation you want to receive GitHub events. In that conversation, execute /bot whereami - the bot will message the id for that specific conversation. Record the conversation id.

  2. In your GitHub project, access Project Settings > Web Hooks & Services > Add webhook

  3. Specify the Payload URL:

    https://<your bot ip/domain name>:<port number>/<conversation id>/
    
  4. While entering the above address, a "Disable SSL Verification" button will pop up at the bottom of the panel. If you are using a self-signed certificate, you will have to click this button or GitHub will not be able to send push notifications to your bot.

  5. Ensure the Active box is checked, and click Add Webhook

  6. If everything is correct, you will see a message on your bot log stating that it has received some "github zen" - essentially a random sentence that indicates that GitHub has successfully connected and sent a message.

# ## ###

Clone this wiki locally