Skip to content

Commit 9975cbe

Browse files
committed
GitCommit: include commit author/committer signatures
1 parent 398c530 commit 9975cbe

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/scmrepo/git/backend/gitpython.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,12 @@ def resolve_commit(self, rev: str) -> "GitCommit":
398398
commit.committer_tz_offset,
399399
commit.message,
400400
[str(parent) for parent in commit.parents],
401+
commit.committer.name,
402+
commit.committer.email,
403+
commit.author.name,
404+
commit.author.email,
405+
commit.authored_date,
406+
commit.author_tz_offset,
401407
)
402408

403409
def set_ref(

src/scmrepo/git/backend/pygit2/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,12 @@ def resolve_commit(self, rev: str) -> "GitCommit":
387387
commit.commit_time_offset,
388388
commit.message,
389389
[str(parent) for parent in commit.parent_ids],
390+
commit.committer.name,
391+
commit.committer.email,
392+
commit.author.name,
393+
commit.author.email,
394+
commit.author.time,
395+
commit.author.offset,
390396
)
391397

392398
def _get_stash(self, ref: str):

src/scmrepo/git/objects.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ class GitCommit:
162162
commit_time_offset: int
163163
message: str
164164
parents: List[str]
165+
committer_name: str
166+
committer_email: str
167+
author_name: str
168+
author_email: str
169+
author_time: int
170+
author_time_offset: int
165171

166172

167173
@dataclass

0 commit comments

Comments
 (0)