Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

feature request - filter pull requests by reviewer #541

Open
mikedfunk opened this issue Jun 21, 2018 · 4 comments
Open

feature request - filter pull requests by reviewer #541

mikedfunk opened this issue Jun 21, 2018 · 4 comments

Comments

@mikedfunk
Copy link

I used to do

gh pr --list --all --org={my_org} --assignee={me}

And I would get a list of all pull requests in my organization assigned to me. But now github has split reviewers from assignees, and my team uses the first one on the list which is reviewers. gh does not have an arg to filter by reviewer currently.

Can this be added? e.g.

gh pr --list --all --org={my_org} --reviewer={me}
@protoEvangelion
Copy link
Member

@mikedfunk That seems like a helpful way to filter PRs.
I am in the process of completely rewriting gh to use TypeScript and Github's new GraphQL api.
Adding the ability to filter by reviewer would probably quite trivial at that point (but I am estimating that the release won't be for at least several months).
If you would be willing to send a PR though against our master branch, I would likely merge your work.
Otherwise I will add this to the v2 release.

@protoEvangelion
Copy link
Member

On second thought, this doesn't seem to be as trivial as I imagined.

If you take a look at https://developer.github.com/v4/explorer/ and search for "pullrequests" in the docs and click on the "pullRequests" part of "Repository.pullRequests".

You will notice that we cannot filter on Github's api by the reviewer. So although it is possible, we would have to perform the filtering on our end.

@amir-reconstruct
Copy link

Any updates to this? It will be really handy to have this filter

@protoEvangelion
Copy link
Member

No update but good to know you find this valuable. I will move it higher up in my queue unless you feel so inclined to send a PR for it ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants