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
Asked
Active
Viewed 1,115 times
2

Neo Gónzáles
- 191
- 2
- 13
1 Answers
2
"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():
usernames_involved.add(review.user.username)
users_requested, teams_requested = pr.get_review_requests()
for user in users_requested:
usernames_involved.add(user.username)
for team in teams_requested:
for user in team.get_members():
usernames_involved.add(user.username)
print(usernames_involved)

davegaeddert
- 3,139
- 1
- 21
- 20