fix status webhook

This commit is contained in:
Kayou 2020-06-13 00:29:08 +02:00 committed by GitHub
parent 34bc321579
commit ef09593922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -462,9 +462,9 @@ async def github(request):
url = request.json["commit"]["html_url"] url = request.json["commit"]["html_url"]
commit_message = request.json["commit"]["commit"]["message"].replace("\n", " ") commit_message = request.json["commit"]["commit"]["message"].replace("\n", " ")
if request.json["commit"]["committer"]: if request.json["commit"]["committer"]:
commit_author = request.json["commit"]["committer"]["login"] commit_author = request.json["commit"]["committer"]["name"]
else: else:
commit_author = request.json["commit"]["author"]["login"] commit_author = request.json["commit"]["author"]["name"]
branches = ", ".join((x["name"] for x in request.json["branches"])) branches = ", ".join((x["name"] for x in request.json["branches"]))
if state not in ("success", "pending"): if state not in ("success", "pending"):