File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -152,15 +152,17 @@ def log_repositories_pr(
152152 }
153153
154154 if log_comments :
155- for comment in pull .get_comments ():
156- info = info_tmp
157- info ['comment body' ] = comment .body
158- info ['comment created at' ] = comment .created_at
159- info ['comment author name' ] = comment .user .name
160- info ['comment author login' ] = comment .user .login
161- info ['comment author email' ] = nvl (comment .user .email )
162- log_pr_to_csv (info , csv_name )
163- log_pr_to_stdout (info )
155+ comments = pull .get_comments ()
156+ if comments .totalCount > 0 :
157+ for comment in comments :
158+ info = info_tmp
159+ info ['comment body' ] = comment .body
160+ info ['comment created at' ] = comment .created_at
161+ info ['comment author name' ] = comment .user .name
162+ info ['comment author login' ] = comment .user .login
163+ info ['comment author email' ] = nvl (comment .user .email )
164+ log_pr_to_csv (info , csv_name )
165+ log_pr_to_stdout (info )
164166 else :
165167 log_pr_to_csv (info_tmp , csv_name )
166168 log_pr_to_stdout (info_tmp )
You can’t perform that action at this time.
0 commit comments