how to get github pull request all reviewers using python (pyGithub)

I'm using pyGithub to interact with github, i'd like to get all reviewer list for a pull request. There's a api pullrequest.get_review_requests() which only returns people who were asked for review, not returning people who joined as reviewer. Is there any api call i can get full list of reviewer (including people who was asked for review and people who self joined as reviewer)? Thanks. -Neo


"Reviews" and "review requests" are two different things that you have to combine on your own, as far as I know. One difference though is that "review requests" can be an entire team or a single user. "Reviews" are only associated with a single user.

With PyGitHub I think you'd be looking to do something like this:

usernames_involved = set()

for review in pr.get_reviews():

users_requested, teams_requested = pr.get_review_requests()

for user in users_requested:

for team in teams_requested:
    for user in team.get_members():

Posted on by davegaeddert