Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

to capture the # of "requested changes" each PR gets per Developer

Shari Callahan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 22, 2024

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

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2024

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events