atudomain.git.Commit

class atudomain.git.Commit.Commit(is_merge: bool, commit_id: str, tree: str, parents: List[str], author: str, author_email: str, author_date: datetime.datetime, committer: str, committer_email: str, committer_date: datetime.datetime, message: str, message_subject: str, message_body: str)

Represents git repository commit as extracted from ‘git log –pretty=raw’. Stores data as properties and has additional methods for getting dates as strings.

property author: str
Return type

str

property author_date: datetime.datetime
Return type

datetime.datetime

property author_email: str
Return type

str

property commit_id: str
Return type

str

property committer: str
Return type

str

property committer_date: datetime.datetime
Return type

datetime.datetime

property committer_email: str
Return type

str

get_author_date_string(date_format='%Y-%m-%d %H:%M:%S %z')str

Converts stored datetime author_date to UTC+0 string date.

Parameters

date_format (str) – Optional date format as for datetime.strftime method.

Returns

Converted date.

Return type

str

get_committer_date_string(date_format='%Y-%m-%d %H:%M:%S %z')str

Converts stored datetime committer_date to UTC+0 string date.

Parameters

date_format (str) – Optional date format as for datetime.strftime method.

Returns

Converted date.

Return type

str

property is_merge: bool
Return type

bool

property message: str
Return type

str

property message_body: str
Return type

str

property message_subject: str
Return type

str

property parents: List[str]
Return type

List[str]

property tree: str
Return type

str