References:
        https://developer.github.com/v3/git/refs/#get-a-reference

def get_repo_ref(repo: GithubRepository, ref: str) -> Dict[str, Any]:
    """
    References:
        https://developer.github.com/v3/git/refs/#get-a-reference
    """

    url = ("https://api.github.com/repos/{}/{}/git/refs/{}"
           "?access_token={}".format(repo.organization,
                                     repo.name,
                                     ref,
                                     repo.access_token))
    response = requests.get(url)
    if response.status_code != 200:
        raise RuntimeError(
            'Refs get failed. Code: {}. Content: {}.'.format(
                response.status_code, response.content))
    payload = json.JSONDecoder().decode(response.content.decode())
    return payload