-
Notifications
You must be signed in to change notification settings - Fork 2
Sinks (2.3.4 and below)
OBSOLETE: THIS SECTION IS COMPLETELY OUTDATED AND SHOULD NOT BE USED AS A REFERENCE. IT IS PRESERVED FOR HISTORICAL PURPOSES. PLEASE USE THE UPDATED SINK PATTERNS
Sinks allow the bot to receive external events in the form of JSON-based web requests. Presently the bot comes pre-packaged with several sinks:
[GitLab webhook sink] (https://github.com/nylonee/hangupsbot/tree/master/hangupsbot/sinks/gitlab) that postsgit push
information in a hangout, setup information available below.[GitHub webhook sink] (https://github.com/nylonee/hangupsbot/tree/master/hangupsbot/sinks/github) that postsgit push
information in a hangout, setup is similar to the GitLab webhook sink[Hubot Message Receiver] (https://github.com/nylonee/hangupsbot/tree/master/hangupsbot/sinks/hubotreceive) more information available on the the dedicated page for [hubot integration] (https://github.com/nylonee/hangupsbot/wiki/Hubot-Integration)[demo sink] (https://github.com/nylonee/hangupsbot/tree/master/hangupsbot/sinks/generic) that works withhangupsbot/tests/send.py
All sinks/receivers are based on BaseHTTPRequestHandler
- the [demo sink]
(https://github.com/nylonee/hangupsbot/tree/master/hangupsbot/sinks/generic)
is a very basic example.
Some recommendations:
- Always use SSL/TLS, a self-signed certificate is better than nothing
- Setting
config.jsonrpc[].name
to "127.0.0.1" will start the sink but only allow connections fromlocalhost
- use this to debug potentially unsafe sinks.
For documentation on available functions for sink authors, please see: Functions for Plugin and Bot Developers
Important: When debugging sinks, please note that due to the threading model, exceptions cannot be caught by the bot nor can they be logged directly. You will have to handle your own exceptions and any debug output manually.
The rest of this page documents how to setup integration with GitLab. The instructions are also applicable for the GitHub sink (which uses a fairly similar script).
Note: Obsolete documentation has been removed from this section.
This sink has been updated for bot framework 2.7 and above - please see the updated documentation for:
- GitLab Web Hook Sink
- GitHub Web Hook Sink - related, as it has similar setup, configuration and usage
Plugin List | Developer Reference: [ Intro | Plugins | Sinks | In-built Functionality | [Configuration] (Configuration) ]