the request is to pull, for a specific timeframe, the number of PRs that had Needs Work/Requested Changes feedback broken down by developer
Example:
Start Date: 07/14/24 - 07/21/24
Developer A created PR#123,
got 5 reviews
2 approve
2 give feedback and tag 'Requested Changes'
1 concurs with one of the 2 points of feedback
results:
Developer A, PR#123, 3 Requested Changes
Please note, I'm not a developer but will be handing over the responses/guidance
Hey @Shari Callahan ,
thank you for reaching out to Community!
I've noticed you opened a support ticket with this same request for Bitbucket Cloud, so I'll be sharing the response in here as well in case other users come across the same requirement in the future.
Although we do not currently offer a tool specifically designed for generating those reports, the information you're looking for is readily available on the Bitbucket Cloud public API.
For instance, you can utilize endpoints like "List pull requests," "Get a pull request" and "List a pull request activity log " to retrieve relevant information.
Following is an example of using the List a pull request activity log endpoint to get all the activities in a pull request (such as comments, updates, approvals and request changes) and pass that information to jq to filter only by "Requested changes" :
curl -u USERNAME:APP_PASSWORD --location 'https://api.bitbucket.org/2.0/repositories/WORKSPACE/REPOSITORY/pullrequests/PULLREQUEST_ID/activity' | jq '.values[] | select(.changes_requested)'
By exploring this endpoint and others detailed in the public API documentation, you can develop custom scripts to extract the necessary information.
A helpful guide on how to query/filter the API results on some example Python scripts can be found in the article below:
Thank you, @Shari Callahan !
Patrik S
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.