mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-01-16 08:05:57 +00:00
Adds formatter for "github release notifier" notifications
This commit is contained in:
parent
722e33335c
commit
9bf937245e
@ -71,3 +71,12 @@ def gitlab_teams(data, headers):
|
||||
|
||||
data["body"] = " \n".join(body)
|
||||
return data
|
||||
|
||||
|
||||
def grn(data, headers):
|
||||
"""Pretty-print a github release notifier (grn) notification."""
|
||||
version, title, author, package = (
|
||||
data[k] for k in ["version", "title", "author", "package_name"]
|
||||
)
|
||||
data["body"] = f"### {package} - {version}\n\n{title}\n\n[{author} released new version **{version}** for **{package}**](https://github.com/{package}/releases/tag/{version}).\n\n"
|
||||
return data
|
||||
|
||||
Loading…
Reference in New Issue
Block a user