mirror of
https://github.com/YunoHost/webhooks.git
synced 2024-09-03 19:56:54 +02:00
[fix] apparently sometime there isn't any commiter
This commit is contained in:
parent
1fbb3c6a30
commit
34bc321579
1 changed files with 4 additions and 1 deletions
|
@ -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", " ")
|
||||
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"):
|
||||
|
|
Loading…
Reference in a new issue