Skip to content

Commit 488fb1d

Browse files
f
1 parent 6abbf9a commit 488fb1d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

commits_parser.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import asdict, dataclass
2-
from datetime import datetime
2+
from date_and_time import date_and_time
33
from time import sleep
44
from typing import Generator
55

@@ -14,8 +14,9 @@
1414
class CommitData:
1515
repository_name: str = ''
1616
author_name: str = ''
17+
author_login: str = ''
1718
author_email: str = ''
18-
datetime: str = ''
19+
date_and_time: str = ''
1920
changed_files: str = ''
2021
commit_id: str = ''
2122
branch: str = ''
@@ -51,8 +52,9 @@ def log_repository_commits(
5152
commit_data = CommitData(
5253
repository_name=repository.name,
5354
author_name=commit.author.username,
55+
author_login=commit.author.login or EMPTY_FIELD,
5456
author_email=commit.author.email or EMPTY_FIELD,
55-
datetime=commit.date.astimezone(pytz.timezone(TIMEZONE)).isoformat(),
57+
date_and_time=commit.date.astimezone(pytz.timezone(TIMEZONE)).isoformat(),
5658
changed_files=changed_files,
5759
commit_id=commit._id,
5860
branch=branch,
@@ -70,8 +72,8 @@ def log_repository_commits(
7072
def log_commits(
7173
binded_repos: Generator[tuple[IRepositoryAPI, Repository, str], None, None],
7274
csv_name: str,
73-
start: datetime,
74-
finish: datetime,
75+
start: date_and_time,
76+
finish: date_and_time,
7577
branch: str,
7678
fork_flag: bool,
7779
):

0 commit comments

Comments
 (0)