Skip to content

Commit 612ab8a

Browse files
fix issues struct
1 parent 049edbb commit 612ab8a

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.github/workflows/smoke-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ jobs:
9090
else
9191
echo "::error::Header is invalid for ${{ matrix.args }}"
9292
echo "Expected: $HEADER"
93-
echo "Actual: $FIRST_LINE"
93+
echo "Actual: $FIRST_LINE"
9494
exit 1
9595
fi

issues_parser.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
@dataclass(kw_only=True, frozen=True)
16-
class IssueData:
16+
class IssueDataWithComment:
1717
repository_name: str = ''
1818
number: int = 0
1919
title: str = ''
@@ -23,23 +23,19 @@ class IssueData:
2323
creator_name: str = ''
2424
creator_login: str = ''
2525
creator_email: str = ''
26-
closed_at: str | None = None
2726
closer_name: str | None = None
2827
closer_login: str | None = None
2928
closer_email: str | None = None
30-
assignee_story: str = ''
31-
connected_pull_requests: str = ''
32-
labels: str = ''
33-
milestone: str = ''
34-
35-
36-
@dataclass(kw_only=True, frozen=True)
37-
class IssueDataWithComment(IssueData):
29+
closed_at: str | None = None
3830
comment_body: str = ''
3931
comment_created_at: str = ''
4032
comment_author_name: str = ''
4133
comment_author_login: str = ''
4234
comment_author_email: str = ''
35+
assignee_story: str = ''
36+
connected_pull_requests: str = ''
37+
labels: str = ''
38+
milestone: str = ''
4339

4440

4541
def get_connected_pulls(
@@ -191,7 +187,7 @@ def get_info(obj, attr):
191187
):
192188
continue
193189

194-
issue_data = IssueData(
190+
issue_data = IssueDataWithComment(
195191
repository_name=repository.name,
196192
number=issue._id,
197193
title=issue.title,
@@ -220,7 +216,7 @@ def get_info(obj, attr):
220216
sleep(TIMEDELTA)
221217

222218

223-
def log_issue_and_comments(csv_name, issue_data: IssueData, comments):
219+
def log_issue_and_comments(csv_name, issue_data: IssueDataWithComment, comments):
224220
if comments:
225221
for comment in comments:
226222
comment_data = IssueDataWithComment(

0 commit comments

Comments
 (0)