project_meta.git_info

Module to retrieve git metadata for the project.

class project_meta.git_info.GitInfo(branch, commit, dirty)

Bases: object

Dataclass to hold git information.

Parameters:
  • branch (str) – Current git branch name.

  • commit (str) – Current git commit SHA.

  • dirty (bool) – Boolean indicating if there are uncommitted changes.

static create(repo_path)

Get the project git metadata.

Parameters:

repo_path (Path) – Path to the git repository.

Returns:

GitInfo dataclass.

Return type:

GitInfo