From 34bc3215791e6654b2565b4b8f711853c9122fcf Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 9 May 2020 13:23:36 +0200 Subject: [PATCH] [fix] apparently sometime there isn't any commiter --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index c4c29a0..30c84cc 100644 --- a/server.py +++ b/server.py @@ -461,7 +461,10 @@ async def github(request): user = request.json["sender"]["login"] url = request.json["commit"]["html_url"] commit_message = request.json["commit"]["commit"]["message"].replace("\n", " ") - commit_author = request.json["commit"]["committer"]["login"] + if request.json["commit"]["committer"]: + commit_author = request.json["commit"]["committer"]["login"] + else: + commit_author = request.json["commit"]["author"]["login"] branches = ", ".join((x["name"] for x in request.json["branches"])) if state not in ("success", "pending"):