comparison mod_pubsub_github/README.markdown @ 3517:ea1edd7cfb01

mod_pubsub_github: Add support for publishing to multiple node based on repository
author Kim Alvefur <zash@zash.se>
date Sun, 31 Mar 2019 18:10:12 +0200
parents f756e051fa02
children 0c3043f06ef7
comparison
equal deleted inserted replaced
3516:d94875c3ddda 3517:ea1edd7cfb01
18 Load the module on a pubsub component: 18 Load the module on a pubsub component:
19 19
20 Component "pubsub.example.com" "pubsub" 20 Component "pubsub.example.com" "pubsub"
21 modules_enabled = { "pubsub_github" } 21 modules_enabled = { "pubsub_github" }
22 22
23 The URL for Github to post to would be either:
24
25 - `http://pubsub.example.com:5280/pubsub_github`
26 - `https://pubsub.example.com:5281/pubsub_github`
27
23 The module also takes the following config options: 28 The module also takes the following config options:
24 29
25 Name Default Description 30 Name Default Description
26 ----------------------- ------------------- ------------------------------------------------------------ 31 ----------------------- ------------------- ------------------------------------------------------------
27 `github_node` `"github"`{.lua} The pubsub node to publish commits on. 32 `github_node` `"github"`{.lua} The pubsub node to publish commits on.
28 `github_secret` **Required** Shared secret used to sign HTTP requests. 33 `github_secret` **Required** Shared secret used to sign HTTP requests.
34 `github_node_prefix` `"github/"`{.lua}
35 `github_node_mapping` *not set* Field in repository object to use as node instead of `github_node`
29 `github_actor` *superuser* Which actor to do the publish as (used for access control) 36 `github_actor` *superuser* Which actor to do the publish as (used for access control)
30 37
31 The URL for Github to post to would be either: 38 More advanced example
32 39
33 - http://pubsub.example.com:5280/pubsub\_github 40 ``` {.lua}
34 - https://pubsub.example.com:5281/pubsub\_github 41 Component "pubsub.example.com" "pubsub"
42 modules_enabled = { "pubsub_github" }
43 github_actor = "github.com"
44 github_node_mapping = "name" --> github_node_prefix .. "repo"
45 -- github_node_mapping = "full_name" --> github_node_prefix .. "owner/repo"
46 github_secret = "sekr1t"
47 ```
35 48
36 If your HTTP host doesn't match the pubsub component's address, you will 49 If your HTTP host doesn't match the pubsub component's address, you will
37 need to inform Prosody. For more info see Prosody's [HTTP server 50 need to inform Prosody. For more info see Prosody's [HTTP server
38 documentation](https://prosody.im/doc/http#virtual_hosts). 51 documentation](https://prosody.im/doc/http#virtual_hosts).
39 52