Is there a way to get a list of all open PRs across all repositories under a team?

I have searched quite a bit, and while I have seen the various search capabilities of https://help.github.com/en/github/searching-for-information-on-github/searching-issues-and-pull-requests - I haven’t beeen able to find a way to get a list of open PRs across the many repositories that belong to my team.  Does this exist?

4 Likes

Hi!

I think the answer to your question is yes.

Some time ago I wrote a program that did, among other things, list pull requests (open or closed) on organization level (assigned to you or not). If you want to check how it is done via GitHub’s GraphQL API you can have a look at the GraphQL queries in my code, if you intend to write an application or service that does that.

If you want to search pull requests via the search field on GitHub webpage, it is possible as well. For example, searching for all open pull requests in the organization “apple” is done with

is:pr user:apple is:open

in the search field.

Hope any of these alternatives was of some help!

3 Likes

Thanks - that does work for an organization name, but I am specifically trying to get open PRs for a team (under an organization), filtering it to the entire organization is returning too many results.

2 Likes

Same here. Totally floored that github doesn’t seem to support this. 

2 Likes

I have exactly the same issue, only found a workaround so far.

The workaround is to create a PR template in each repo that automatically tags your team in PR description. Then you can use a filter like this to view all currently open pull requests:

is:open is:pr archived:false team:<team>

It works OK for manual PRs, but for example Dependabot uses its own template so those would not show up using that search.

I hope GitHub will add support for this soon! Listing PRs for the entire organization is of no use if there are many teams in the organization.

Hi, briefly saw this in my search and then briefly saw the following in my search. Haven’t seen anything for me in my search though :slight_smile: I don’t know if you use vscode or if this will help you but I hope so

https://marketplace.visualstudio.com/items?itemName=ryanstedman.tfs-pullrequest-dashboard