Diff

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
parent 3515:f756e051fa02
child 3527:0c3043f06ef7
line wrap: on
line diff
--- a/mod_pubsub_github/README.markdown	Sun Mar 31 18:08:50 2019 +0200
+++ b/mod_pubsub_github/README.markdown	Sun Mar 31 18:10:12 2019 +0200
@@ -20,18 +20,31 @@
     Component "pubsub.example.com" "pubsub"
         modules_enabled = { "pubsub_github" }
 
+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"`{.lua}    The pubsub node to publish commits on.
   `github_secret`         **Required**        Shared secret used to sign HTTP requests.
+  `github_node_prefix`    `"github/"`{.lua}
+  `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)
 
-The URL for Github to post to would be either:
+More advanced example
 
--   http://pubsub.example.com:5280/pubsub\_github
--   https://pubsub.example.com:5281/pubsub\_github
+``` {.lua}
+Component "pubsub.example.com" "pubsub"
+    modules_enabled = { "pubsub_github" }
+    github_actor = "github.com"
+    github_node_mapping = "name" --> github_node_prefix .. "repo"
+    -- github_node_mapping = "full_name" --> github_node_prefix .. "owner/repo"
+    github_secret = "sekr1t"
+```
 
 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