add a catch-all event to discover available notifications

This commit is contained in:
Lephenixnoir 2021-03-06 13:47:07 +01:00
parent 066b4f3412
commit 5b39da9714
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 9 additions and 0 deletions

9
app.py
View File

@ -77,6 +77,15 @@ def main():
if data['action'] == "created":
msg = f"{url_user} a répondu au ticket {url_issue} dans {url_repository}"
if event == "pull_request" and data["action"] == "assigned":
return "IGN"
if not msg:
msg = f"Événement {event}"
if "repository" in data:
msg += " sur " + make_url_repository(data["repository"])
msg += "."
if msg:
msg = f"[gray][i]{msg}[/i][/gray]"
app.logger.warn(msg)