git_interface.tag
Methods for using the ‘tag’ command
- async git_interface.tag.create_tag(git_repo, tag_name, commit_hash=None)
Create a new lightweight tag
- param git_repo:
Path to the repo
- param tag_name:
The tag name to use
- param commit_hash:
Create tag on a different commit other than HEAD, defaults to None
- raises AlreadyExistsException:
When the tag name already exists
- raises GitException:
Error to do with git
- Parameters:
git_repo (Path | str)
tag_name (str)
commit_hash (str | None)
- async git_interface.tag.delete_tag(git_repo, tag_name)
Delete a tag
- param git_repo:
Path to the repo
- param tag_name:
The tag name to use
- raises DoesNotExistException:
The tag was not found
- raises GitException:
Error to do with git
- return:
Output provided by the git when a tag is removed
- Parameters:
git_repo (Path | str)
tag_name (str)
- Return type:
str
- async git_interface.tag.list_tags(git_repo, tag_pattern=None)
List all git tags or filter with a wildcard pattern
- param git_repo:
Path to the repo
- param tag_pattern:
Filter the tag list with a wildcard pattern, defaults to None
- raises GitException:
Error to do with git
- return:
List of found git tags
- Parameters:
git_repo (Path | str)
tag_pattern (str | None)
- Return type:
list[str]