Merge pull request #1 from YunoHost/kay0u-patch-1

fix status webhook
This commit is contained in:
Bram 2020-06-14 23:13:35 +02:00 committed by GitHub
commit f0da6f04a8
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"):