Skip to content

Commit

Permalink
Check if payload contains "committer" info. (GH-31)
Browse files Browse the repository at this point in the history
There were cases where data["commit"]["committer"] is null.
  • Loading branch information
Mariatta authored Sep 29, 2017
1 parent d9bd808 commit 70317f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backport/status_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ async def check_status(event, gh, *args, **kwargs):
"""
Check the state change
"""
if event.data["commit"]["committer"]["login"] == "miss-islington":
if event.data["commit"].get("committer") \
and event.data["commit"]["committer"]["login"] == "miss-islington":
sha = event.data["sha"]
status_url = f"https://api.github.com/repos/python/cpython/commits/{sha}/status"
request_headers = sansio.create_headers(
Expand Down

0 comments on commit 70317f4

Please sign in to comment.