This module accepts Github web hooks and publishes them to a local pubsub component for XMPP clients to subscribe to.
Entries are pushed as Atom payloads.
It may also work with Gitlab.
Load the module on a pubsub component:
"pubsub.example.com" "pubsub"
Component = { "pubsub_github" }
modules_enabled = "NP7bZooYSLKze96TQMpFW5ov" github_secret
The URL for Github to post to would be either:
http://pubsub.example.com:5280/pubsub_github
https://pubsub.example.com:5281/pubsub_github
The module also takes the following config options:
Name | Default | Description |
---|---|---|
github_node |
"github" |
The pubsub node to publish commits on. |
github_secret |
Required | Shared secret used to sign HTTP requests. |
github_node_prefix |
"github/" |
|
github_node_mapping |
not set | Field in repository object to use as node
instead of github_node |
github_actor |
superuser | Which actor to do the publish as (used for access control) |
More advanced example
"pubsub.example.com" "pubsub"
Component = { "pubsub_github" }
modules_enabled = "github.com"
github_actor = "name" --> github_node_prefix .. "repo"
github_node_mapping -- github_node_mapping = "full_name" --> github_node_prefix .. "owner/repo"
= "sekr1t" github_secret
If your HTTP host doesn’t match the pubsub component’s address, you will need to inform Prosody. For more info see Prosody’s HTTP server documentation.
0.10 | Should work |
0.9 | Works |
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_pubsub_github
For earlier versions see the documentation for installing 3rd party modules