Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ForgejoRepoAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def get_commits(self, repo: Repository, files: bool = True) -> list[Commit]:
files=(
[f.filename for f in getattr(c, "files", [])] if files else None
),
additions=None, # TODO
deletions=None, # TODO
)
for c in commits
]
Expand Down
2 changes: 2 additions & 0 deletions GitHubRepoAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def get_commits(self, repo: Repository, files: bool = True) -> list[Commit]:
author=self.get_user_data(c.author),
date=c.commit.author.date,
files=[f.filename for f in c.files] if files else None,
additions=c.stats.additions,
deletions=c.stats.deletions,
)
for c in commits
]
Expand Down
4 changes: 4 additions & 0 deletions commits_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class CommitData:
changed_files: str = ''
commit_id: str = ''
branch: str = ''
additions: str = ''
deletions: str = ''


def log_repository_commits(
Expand Down Expand Up @@ -54,6 +56,8 @@ def log_repository_commits(
changed_files=changed_files,
commit_id=commit._id,
branch=branch,
additions=commit.additions,
deletions=commit.deletions,
)
info = asdict(commit_data)

Expand Down
2 changes: 2 additions & 0 deletions interface_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Commit:
author: User
date: datetime
files: list[str]
additions: int
deletions: int


@dataclass
Expand Down