Mercurial > prosody-modules
comparison mod_pubsub_github/README.md @ 5975:fe081789f7b5
All community modules: Unify file extention of Markdown files to .md
| author | Menel <menel@snikket.de> |
|---|---|
| date | Tue, 22 Oct 2024 10:26:01 +0200 |
| parents | mod_pubsub_github/README.markdown@1fcf3cb7bb50 |
| children |
comparison
equal
deleted
inserted
replaced
| 5974:5a65a632d5b9 | 5975:fe081789f7b5 |
|---|---|
| 1 --- | |
| 2 labels: | |
| 3 - 'Stage-Beta' | |
| 4 summary: Publish Github commits over pubsub | |
| 5 --- | |
| 6 | |
| 7 ## Introduction | |
| 8 | |
| 9 This module accepts Github web hooks and publishes them to a local | |
| 10 pubsub component for XMPP clients to subscribe to. | |
| 11 | |
| 12 Entries are pushed as Atom payloads. | |
| 13 | |
| 14 It may also work with Gitlab. | |
| 15 | |
| 16 ## Configuration | |
| 17 | |
| 18 Load the module on a pubsub component: | |
| 19 | |
| 20 ``` {.lua} | |
| 21 Component "pubsub.example.com" "pubsub" | |
| 22 modules_enabled = { "pubsub_github" } | |
| 23 github_secret = "NP7bZooYSLKze96TQMpFW5ov" | |
| 24 ``` | |
| 25 | |
| 26 The URL for Github to post to would be either: | |
| 27 | |
| 28 - `http://pubsub.example.com:5280/pubsub_github` | |
| 29 - `https://pubsub.example.com:5281/pubsub_github` | |
| 30 | |
| 31 The module also takes the following config options: | |
| 32 | |
| 33 Name Default Description | |
| 34 ----------------------- ------------------- ------------------------------------------------------------ | |
| 35 `github_node` `"github"`{.lua} The pubsub node to publish commits on. | |
| 36 `github_secret` **Required** Shared secret used to sign HTTP requests. | |
| 37 `github_node_prefix` `"github/"`{.lua} | |
| 38 `github_node_mapping` *not set* Field in repository object to use as node instead of `github_node` | |
| 39 `github_actor` *superuser* Which actor to do the publish as (used for access control) | |
| 40 | |
| 41 More advanced example | |
| 42 | |
| 43 ``` {.lua} | |
| 44 Component "pubsub.example.com" "pubsub" | |
| 45 modules_enabled = { "pubsub_github" } | |
| 46 github_actor = "github.com" | |
| 47 github_node_mapping = "name" --> github_node_prefix .. "repo" | |
| 48 -- github_node_mapping = "full_name" --> github_node_prefix .. "owner/repo" | |
| 49 github_secret = "sekr1t" | |
| 50 ``` | |
| 51 | |
| 52 If your HTTP host doesn't match the pubsub component's address, you will | |
| 53 need to inform Prosody. For more info see Prosody's [HTTP server | |
| 54 documentation](https://prosody.im/doc/http#virtual_hosts). | |
| 55 | |
| 56 ## Compatibility | |
| 57 | |
| 58 ------ ------------- | |
| 59 0.10 Should work | |
| 60 0.9 Works | |
| 61 ------ ------------- |
