code: def get_version_from_tag(tag_name: str) -> Optional[str]:
      
  
      debug('get_version_from_tag({})'.format(tag_name))
      check_repo()
      for i in repo.tags:
          if i.name == tag_name:
              return i.commit.hexsha
      return None
docs: Get git hash from tag
  
      :param tag_name: Name of the git tag (i.e. 'v1.0.0')
      :return: sha1 hash of the commit