File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -73,17 +73,22 @@ def measure_time_to_first_response(
7373 # so we may also get the first review comment time
7474 if pull_request :
7575 review_comments = pull_request .reviews (number = 50 ) # type: ignore
76- for review_comment in review_comments :
77- if ignore_comment (
78- issue .issue .user ,
79- review_comment .user ,
80- ignore_users ,
81- review_comment .submitted_at ,
82- ready_for_review_at ,
83- ):
84- continue
85- first_review_comment_time = review_comment .submitted_at
86- break
76+ try :
77+ for review_comment in review_comments :
78+ if ignore_comment (
79+ issue .issue .user ,
80+ review_comment .user ,
81+ ignore_users ,
82+ review_comment .submitted_at ,
83+ ready_for_review_at ,
84+ ):
85+ continue
86+ first_review_comment_time = review_comment .submitted_at
87+ break
88+ except TypeError as e :
89+ print (
90+ f"An error occurred processing review comments. Perhaps the review contains a ghost user. { e } "
91+ )
8792
8893 # Figure out the earliest response timestamp
8994 if first_comment_time and first_review_comment_time :
You can’t perform that action at this time.
0 commit comments