git#
Miscellaneous functions for interfacing with git
.
- showyourwork.git.callback(code, stdout, stderr)#
Silent failure callback for functions defined in this module.
- Returns:
The result of the function call, or
unknown
on error.- Return type:
str
- showyourwork.git.get_commit_message()#
Return the message of the latest commit to the current branch.
- showyourwork.git.get_repo_branch()#
Return the current repository branch name.
- showyourwork.git.get_repo_root()#
Return the path to the repository root.
- showyourwork.git.get_repo_sha()#
Return the SHA for the current git commit.
- showyourwork.git.get_repo_slug()#
Return the current repository slug (“user/repo”).
- showyourwork.git.get_repo_tag()#
Return a tag name if the HEAD corresponds to a tagged version.
- showyourwork.git.get_repo_url()#
Return the full repository URL.