    def latest_commit(self, tag: str) -> str:
        """
        Grab the latest commit of a tag.

        Args:
            tag (`str`):
                The tag name.

        Returns:
            (`str`)
                The latest commit hash cut down to 10 characters.

        Raises:
            (`HTTPError`)
                Raise error in request.
        """
        res = self.hub_utils.get_commits(limit=1, page=1, tag=tag)
        return res.json()[0]['sha'][:10]
Grab the latest commit of a tag.

Args:
tag (`str`):
The tag name.

Returns:
(`str`)
The latest commit hash cut down to 10 characters.

Raises:
(`HTTPError`)
Raise error in request.
towhee/hub/repo_manager.py