Software /
code /
prosody-modules
Comparison
mod_pubsub_github/README.md @ 6211:750d64c47ec6 draft default tip
Merge
author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
---|---|
date | Tue, 18 Mar 2025 00:31:36 +0700 (8 days ago) |
parent | 6003:fe081789f7b5 |
comparison
equal
deleted
inserted
replaced
6210:24316a399978 | 6211:750d64c47ec6 |
---|---|
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 ------ ------------- |