annotate mod_pubsub_forgejo/templates.lib.lua @ 6403:13c61a068c71

mod_pubsub_serverinfo: Include hostname in default pubsub node name This change ensures that every host publishes to a unique node by default, which is important when publishing info about multiple hosts. The old default node name was "serverinfo" The new default node name is in the format "serverinfo/example.com" where example.com is automatically replaced by the publishing host's name. This affects existing deployments in the following ways: - If you already configured pubsub_serverinfo_node explicitly in your config, then nothing will change, your current configuration will still be used. - If you did not specify it in your config (i.e. used the default) then the module will switch to publishing to the new node. If your configuration is correct this shouldn't be noticed, because the new node will automatically be created and configured by the module. If you want, you can clean up the old 'serverinfo' node using: prosodyctl shell pubsub delete_node pubsub.example.com serverinfo
author Matthew Wild <mwild1@gmail.com>
date Wed, 11 Feb 2026 09:40:30 +0000
parents 131b8bfbefb4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6175
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
1 local module = {
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
2 push = {
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
3 title = "{data.sender.username} pushed {data.total_commits} commit(s) to {data.repository.name}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
4 content = "{data.commits#- {item.message|firstline} ({item.author.name})\n}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
5 id = "push-{data.head_commit.id}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
6 link = "{data.repository.html_url}/compare/{data.before|shorten}..{data.after|shorten}"
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
7 },
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
8 pull_request = {
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
9 title = "{data.sender.username} {data.action} a pull request for {data.repository.name}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
10 content = "{data.pull_request.title}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
11 id = "pull-{data.pull_request.number}-{data.pull_request.updated_at}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
12 link = "{data.pull_request.html_url}"
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
13 },
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
14 release = {
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
15 title = "{data.sender.username} {data.action} a release for {data.repository.name}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
16 content = "{data.release.name}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
17 id = "release-{data.release.tag_name}",
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
18 link = "{data.release.html_url}"
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
19 }
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
20 }
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
21
131b8bfbefb4 mod_pubsub_forgejo: new module for forgejo webhooks
nicoco <nicoco@nicoco.fr>
parents:
diff changeset
22 return module