code: def get_repo_ref(repo: GithubRepository, ref: str) -> Dict[str, Any]:
      
  
      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
docs: References:
          https://developer.github.com/v3/git/refs/#get-a-reference