Skip to content

Commit 70317f4

Browse files
authored
Check if payload contains "committer" info. (GH-31)
There were cases where data["commit"]["committer"] is null.
1 parent d9bd808 commit 70317f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backport/status_change.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ async def check_status(event, gh, *args, **kwargs):
1717
"""
1818
Check the state change
1919
"""
20-
if event.data["commit"]["committer"]["login"] == "miss-islington":
20+
if event.data["commit"].get("committer") \
21+
and event.data["commit"]["committer"]["login"] == "miss-islington":
2122
sha = event.data["sha"]
2223
status_url = f"https://api.github.com/repos/python/cpython/commits/{sha}/status"
2324
request_headers = sansio.create_headers(

0 commit comments

Comments
 (0)