How do I get all the PRs I've approved or reviewed?

Daniel Fenn March 1, 2022

How do I get all the PRs I've approved or reviewed given a user and/or duration?

Thanks

2 answers

2 accepted

0 votes
Answer accepted
Katarína Lukácsy
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2022

I will be closing this BCLOUD since an endpoint with this capability exists, so I thought I'd add the note here too.

 

Specifically, the pullrequests endpoint (the second one provided above) supports querying, which supports "reviewers.uuid" as well as "author.uuid".

To get a list of open PRs authored or reviewed by a user with user ID equal to 1234567, the API endpoint would look something like this:

 

/2.0/repositories/{workspace}/{repo_slug}/pullrequests?

q=state="OPEN" AND (reviewers.uuid="{12345}" OR author.uuid="{12345}")

0 votes
Answer accepted
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 2, 2022

Hi, @Daniel Fenn, thank you for reaching out to Atlassian Community.

Currently, we don't have a specific endpoint to retrieve all the PRs we have approved or reviewed. However, if you want to check all the Pull Requests you have reviewed in a specific repository, you can follow these steps: 

  • Access the repository

  • Go to Pull Requests

  • Select the options 'I’m reviewing' and 'All':

 PR.png

We do have an endpoint that returns all pull requests authored by the specified user and another one that returns all pull requests on the specified repository as you can see here:

So you could create a script to verify the pull requests from all the repos that you have access to and build a list of any PRs where you were an approver/reviewer if you need this information.

In any case, I went ahead and created a feature request to add this endpoint as you can see here:

I would suggest that you add your vote there (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. 

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy here and any updates will be posted in the feature request. 

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events