Skip to content

Git

feu.git

Contain git utility functions.

feu.git.get_last_tag_name

get_last_tag_name() -> str

Get the name of the most recent tag in the current repository.

Returns:

Type Description
str

The tag name.

Example usage:

>>> from feu.git import get_last_tag_name
>>> tag = get_last_tag_name()
>>> tag

feu.git.get_last_version_tag_name

get_last_version_tag_name() -> str

Get the name of the most recent version tag in the current repository.

A version tag is a tag starting with v{number}*.

Returns:

Type Description
str

The tag name.

Example usage:

>>> from feu.git import get_last_version_tag_name
>>> tag = get_last_version_tag_name()
>>> tag

feu.git.get_tags

get_tags() -> list[TagReference]

Get the list of git tags sorted by date/time for the current repository.

Returns:

Type Description
list[TagReference]

The list of git tags sorted by date/time.

Example usage:

>>> from feu.git import get_tags
>>> tags = get_tags()
>>> tags