[fix] forgot to add code for notification

This commit is contained in:
Laurent Peuch 2019-02-06 01:23:26 +01:00
parent 5bd547a2cb
commit dcf46ebd0e

View file

@ -86,13 +86,13 @@ async def github(request):
repository = request.json["repository"]["name"] repository = request.json["repository"]["name"]
if kind == "repository": if kind == "repository":
f"@{user} created new repository {repository}: {url}" notify(f"@{user} created new repository {repository}: {url}")
elif kind == "branch": elif kind == "branch":
branch = request.json["ref"] branch = request.json["ref"]
f"[{repository}] @{user} created new branch {branch}" notify(f"[{repository}] @{user} created new branch {branch}")
elif kind == "tag": elif kind == "tag":
tag = request.json["ref"] tag = request.json["ref"]
f"[{repository}] @{user} created new tag {tag}" notify(f"[{repository}] @{user} created new tag {tag}")
else: else:
print(f"WARNING: unknown 'create' even kind: {kind}") print(f"WARNING: unknown 'create' even kind: {kind}")