Skip to content

GitContext

Local repository information.

commits class-attribute instance-attribute

commits: list = field(default_factory=list)

List of last commits (Commit objects from GitPython).

current_author class-attribute instance-attribute

current_author: str = ''

Author email for last commit.

current_committer class-attribute instance-attribute

current_committer: str = ''

Committer name for last commit.

current_date_authored class-attribute instance-attribute

current_date_authored: datetime | None = None

Date authored for last commit.

current_date_committed class-attribute instance-attribute

current_date_committed: datetime | None = None

Date committed for last commit.

current_sha class-attribute instance-attribute

current_sha: str = ''

SHA of last commit.

edit_uri class-attribute instance-attribute

edit_uri: str | None = None

Edit uri (depends on code hoster).

last_version class-attribute instance-attribute

last_version: str | None = None

Name of last commit tag.

main_branch class-attribute instance-attribute

main_branch: str = ''

Name of the main branch of the repo (master / main).

repo_hoster class-attribute instance-attribute

repo_hoster: str = ''

Name of the code hoster (for example GitHub)

repo_name class-attribute instance-attribute

repo_name: str = ''

Name of the git folder.

__init__

__init__(
    main_branch: str = "",
    repo_name: str = "",
    commits: list = list(),
    repo_hoster: str = "",
    edit_uri: str | None = None,
    current_sha: str = "",
    current_committer: str = "",
    current_date_committed: datetime | None = None,
    current_author: str = "",
    current_date_authored: datetime | None = None,
    last_version: str | None = None,
) -> None

__repr__

__repr__()
Page info
Resources
Resources(css=[],
          markdown_extensions={'attr_list': {},
                               'md_in_html': {},
                               'pymdownx.emoji': {'emoji_generator': <function to_svg at 0x7fd7a6931800>,
                                                  'emoji_index': <function twemoji at 0x7fd7a69316c0>},
                               'pymdownx.magiclink': {'repo': 'mknodes',
                                                      'repo_url_shorthand': True,
                                                      'user': 'phil65'}},
          plugins=[Plugin('mkdocstrings')],
          js=[],
          assets=[],
          packages=[])
Metadata
created:
  source_filename: /home/runner/work/mknodes/mknodes/mknodes/manual/templating_section.py
  source_function: _
  source_line_no: 42
template: SUMMARY.html
title: GitContext