comparison mod_pubsub_forgejo/templates.lib.lua @ 6175:131b8bfbefb4

mod_pubsub_forgejo: new module for forgejo webhooks
author nicoco <nicoco@nicoco.fr>
date Mon, 17 Feb 2025 23:28:05 +0100
parents
children
comparison
equal deleted inserted replaced
6174:6d5a19bdd718 6175:131b8bfbefb4
1 local module = {
2 push = {
3 title = "{data.sender.username} pushed {data.total_commits} commit(s) to {data.repository.name}",
4 content = "{data.commits#- {item.message|firstline} ({item.author.name})\n}",
5 id = "push-{data.head_commit.id}",
6 link = "{data.repository.html_url}/compare/{data.before|shorten}..{data.after|shorten}"
7 },
8 pull_request = {
9 title = "{data.sender.username} {data.action} a pull request for {data.repository.name}",
10 content = "{data.pull_request.title}",
11 id = "pull-{data.pull_request.number}-{data.pull_request.updated_at}",
12 link = "{data.pull_request.html_url}"
13 },
14 release = {
15 title = "{data.sender.username} {data.action} a release for {data.repository.name}",
16 content = "{data.release.name}",
17 id = "release-{data.release.tag_name}",
18 link = "{data.release.html_url}"
19 }
20 }
21
22 return module