Skip to content

Commit

Permalink
Fix pull requests crash on non-submitted review
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxJedi committed Jul 2, 2024
1 parent 2209c0b commit 83c3726
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pull-requests/get_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def parse_comments(comment_data, review_data, user):
for review_list in review_data:
for review in review_list:
if user != review['user']['login'] and review['user']['login'] in user_list:
# It is possible that the user generating this list has a review
# saved, but not submitted yet, so there is no submission date.
if 'submitted_at' != review:
continue
review_date = review['submitted_at']
break
if review_date is not None:
Expand Down

0 comments on commit 83c3726

Please sign in to comment.