[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-06-11 08:35:24 +00:00
parent 0ca6115b98
commit 929fc79c2e
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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