Is it possible to list Issues/PR per team

Suppose I have this team

https://github.com/orgs/my-org/teams/a-team

I want to see all issues or PR of any of their members just like I can do for my own pulls https://github.com/pulls.

Something like :

  • https://github.com/orgs/my-org/teams/a-team/pulls
  • https://github.com/orgs/my-org/teams/a-team/issues

Thanks in advance.

Brice

1 Like

Hi Brice,

Unfortunately, https://github.com/pulls doesn’t have capabilities to filter pull requests by team name or multiple authors.

However, in Advanced Search, you can search pull requests by multiple authors like this:

https://github.com/search?q=org%3Amaintainers+org%3Amaintainers+is%3Apr+author%3Aclarkbw+author%3Asmashwilson+author%3Aphillmv+author%3AMikeMcQuaid+author%3Aderekprior+author%3Ayassskatie+author%3Alee-dohm+author%3Alukehefson+author%3Asrt32+author%3Aajjimenez+author%3Avanessayuenn+author%3Alabrose+author%3Anaytri+author%3ASSDGM

If your team has lots of members, you can use the List team members API endpoint to get the list of members’ username.

GitHub CLI (https://cli.github.com/) is a handy option to get the job done.

$ gh api --paginate orgs/maintainers/teams/Moderators/members -q '.[].login' | perl -nle 'push @authors, sprintf("author:$_"); END {print join " ", @authors}'
author:clarkbw author:smashwilson author:phillmv author:MikeMcQuaid author:derekprior author:yassskatie author:lee-dohm author:lukehefson author:srt32 author:ajjimenez author:vanessayuenn author:labrose author:naytri author:SSDGM

For more information about searching, please refer the document.
Searching issues and pull requests - GitHub Docs

Cheers,
Kensuke

1 Like