import requests


def _get_latest_tag(org, repo):
    """Return the latest tag name for a given repository."""
    response = requests.get(f"https://api.github.com/repos/{org}/{repo}/git/refs/tags")
    response.raise_for_status()
    tags = response.json()
    latest_tag = list(tags)[-1]
    return latest_tag["ref"].split("/tags/")[-1]