for each repo owned by my company
get a list of open pull requests
get a list of reviewers for that request that have not approved the pull request
print results
Hi @soualline and welcome to the community.
You can use the following endpoints:
The last call has the info you need on approvals and reviewers. The object participants includes PR reviewers and the field participants.approved shows as true or false depending on whether the participant approved the PR or not. Please keep in mind that participants will include also non-reviewers who may have approved the PR. The field participants.role will tell you if the participant is a reviewer or not.
I am not familiar with Python, but an example request with curl that returns participant name, role, and approval status is the following:
curl -u BitbucketUsername:AppPassword https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/pullrequests/2?fields=participants.user.display_name,participants.role,participants.approved
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.