Skip to content

Commit

Permalink
Handle deleted user in the assignee list (#7)
Browse files Browse the repository at this point in the history
* update condition

* Add comment

---------

Co-authored-by: Kevin Thomas <[email protected]>
Co-authored-by: Sean Lip <[email protected]>
  • Loading branch information
3 people authored Feb 1, 2025
1 parent 48e428b commit 265e48e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/github_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ def get_pull_request_dict_with_timestamp(
"""

for assignee in pr_dict['assignees']:
if event['assignee'] is None or assignee is None:
# This situation can arise if a PR was reviewed by a now-deleted
# user.
continue
if event['assignee']['login'] == assignee['login']:
assignee['created_at'] = parser.parse(event['created_at'])
return pr_dict
Expand Down

0 comments on commit 265e48e

Please sign in to comment.