Skip to content

Commit 265e48e

Browse files
kevintab95Kevin Thomasseanlip
authored
Handle deleted user in the assignee list (#7)
* update condition * Add comment --------- Co-authored-by: Kevin Thomas <kevintab@tutanota.com> Co-authored-by: Sean Lip <sean@seanlip.org>
1 parent 48e428b commit 265e48e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/github_services.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ def get_pull_request_dict_with_timestamp(
199199
"""
200200

201201
for assignee in pr_dict['assignees']:
202+
if event['assignee'] is None or assignee is None:
203+
# This situation can arise if a PR was reviewed by a now-deleted
204+
# user.
205+
continue
202206
if event['assignee']['login'] == assignee['login']:
203207
assignee['created_at'] = parser.parse(event['created_at'])
204208
return pr_dict

0 commit comments

Comments
 (0)