diff --git a/README.md b/README.md index d1f6d93..79b19a5 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ Add a Microsoft Teams integration with an URL ending with `?formatter=gitlab_tea #### 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 diff --git a/matrix_webhook/formatters.py b/matrix_webhook/formatters.py index be3ad33..25c5cd2 100644 --- a/matrix_webhook/formatters.py +++ b/matrix_webhook/formatters.py @@ -75,8 +75,10 @@ def gitlab_teams(data, headers): 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"] + 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" + 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