Skip to content

Commit

Bases: GitObject

A commit from the repository history.

commit_hash

commit_hash: str

Full hash of the commit.

date

date: datetime

Date and time when the commit was applied, in UTC.

date_local

date_local: datetime

Date and time when the commit was applied, in local time.

message_subject

message_subject: str

Commit message subject.

message_body

message_body: str

Commit message body.

author_name

author_name: str

Author name.

author_email

author_email: str

Author email.

author_date

author_date: datetime

Date and time when the commit was authored, in UTC.

author_date_local

author_date_local: datetime

Date and time when the commit was authored, in local time.

committer_name

committer_name: str

Committer name.

committer_email

committer_email: str

Committer email.

files_changed

files_changed: int | None

Number of files changed in the commit.

The value of this attribute equals None if blobs=False.

lines_added

lines_added: int | None

Number of lines inserted in the commit.

The value of this attribute equals None if blobs=False.

lines_deleted

lines_deleted: int | None

Number of lines deleted in the commit.

The value of this attribute equals None if blobs=False.

source

source: str

The original branch that produced the commit.

in_main

in_main: bool

Whether the commit is in the default branch's history.

is_merge

is_merge: bool

Whether the commit is a merge commit.

parents

parents: list[str]

List of parent commit hashes.