mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-01-16 08:05:57 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
0ca6115b98
commit
929fc79c2e
@ -124,7 +124,7 @@ Add a Microsoft Teams integration with an URL ending with `?formatter=gitlab_tea
|
|||||||
|
|
||||||
#### Github Release Notifier
|
#### Github Release Notifier
|
||||||
|
|
||||||
To receiver notifications about new releases of projects hosted at github.com you can add a matrix webhook ending with `?formatter=grn&key=API_KEY` to [Github Release Notifier (grn)](https://github.com/femtopixel/github-release-notifier).
|
To receiver notifications about new releases of projects hosted at github.com you can add a matrix webhook ending with `?formatter=grn&key=API_KEY` to [Github Release Notifier (grn)](https://github.com/femtopixel/github-release-notifier).
|
||||||
|
|
||||||
## Test room
|
## Test room
|
||||||
|
|
||||||
|
|||||||
@ -75,8 +75,10 @@ def gitlab_teams(data, headers):
|
|||||||
|
|
||||||
def grn(data, headers):
|
def grn(data, headers):
|
||||||
"""Pretty-print a github release notifier (grn) notification."""
|
"""Pretty-print a github release notifier (grn) notification."""
|
||||||
version, title, author, package = (
|
version, title, author, package = (
|
||||||
data[k] for k in ["version", "title", "author", "package_name"]
|
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"
|
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
|
return data
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user