import requests


def fetch_branch_sha(github_repo_name: str, branch_name: str):
    """Fetches the SHA of a branch from Github"""
    url = f"https://api.github.com/repos/{github_repo_name}/git/refs"
    response = requests.get(url)
    if response.status_code != 200:
        return None
    else:
        branches = response.json()
        for branch in branches:
            if branch["ref"] == f"refs/heads/{branch_name}":
                return branch["object"]["sha"]
    return None