Skip to content

Commit 71e8af1

Browse files
committed
contributors parser implimented, black, revert diff
1 parent 973a94d commit 71e8af1

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

pull_requests_parser.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)