in webhook-app/github_helper.py [0:0]
def get_pr_reviews(pr):
"""Gets a list of all submitted reviews on a PR. Does not list requested
reviews."""
# Required to access the PR review API.
headers = {'Accept': 'application/vnd.github.black-cat-preview+json'}
reviews = pr.session.get(
'https://api.github.com/repos/{}/{}/pulls/{}/reviews'.format(
pr.repository[0], pr.repository[1], pr.number),
headers=headers).json()
return reviews