diff options
Diffstat (limited to 'pydis_site/utils/utils.py')
-rw-r--r-- | pydis_site/utils/utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pydis_site/utils/utils.py b/pydis_site/utils/utils.py new file mode 100644 index 00000000..2033ea19 --- /dev/null +++ b/pydis_site/utils/utils.py @@ -0,0 +1,10 @@ +import git + +# Git SHA +repo = git.Repo(search_parent_directories=True) +GIT_SHA = repo.head.object.hexsha + + +def get_git_sha() -> str: + """Get the Git SHA for this repo.""" + return GIT_SHA |