@@ -26,6 +26,11 @@ class PullRequestData:
2626 creator_login : str = ''
2727 creator_email : str = ''
2828 changed_files : str = ''
29+ comment_body : str = ''
30+ comment_created_at : str = ''
31+ comment_author_name : str = ''
32+ comment_author_login : str = ''
33+ comment_author_email : str = ''
2934 merger_name : str | None = None
3035 merger_login : str | None = None
3136 merger_email : str | None = None
@@ -37,15 +42,6 @@ class PullRequestData:
3742 milestone : str = ''
3843
3944
40- @dataclass (kw_only = True , frozen = True )
41- class PullRequestDataWithComment (PullRequestData ):
42- comment_body : str = ''
43- comment_created_at : str = ''
44- comment_author_name : str = ''
45- comment_author_login : str = ''
46- comment_author_email : str = ''
47-
48-
4945def get_related_issues (pull_request_number , repo_owner , repo_name , token ):
5046 # TODO как-то заменить
5147 return
@@ -164,7 +160,7 @@ def get_info(obj, attr):
164160 comments = client .get_comments (repository , pull )
165161 if comments :
166162 for comment in comments :
167- comment_data = PullRequestDataWithComment (
163+ comment_data = PullRequestData (
168164 ** asdict (pr_data ),
169165 comment_body = comment .body ,
170166 comment_created_at = str (comment .created_at ),
@@ -196,7 +192,7 @@ def log_pull_requests(
196192 fork_flag : bool ,
197193 log_comments = False ,
198194):
199- info = asdict (PullRequestDataWithComment ())
195+ info = asdict (PullRequestData ())
200196 logger .log_to_csv (csv_name , list (info .keys ()))
201197
202198 for client , repo , token in binded_repos :
0 commit comments