How can I filter all GitHub pull requests for a specific target branch

AVIDeveloper picture AVIDeveloper · Dec 12, 2013 · Viewed 15.3k times · Source

I'm working on a GitHub repo with lots of branches and pull requests.

Let's say, for example, that I have the following pull requests:

  • a to branch X
  • b to branch X
  • c to branch Y
  • d to branch X
  • e to branch Y.

Is there a way to find all the pull requests that are targeted for branch X (i.e. a -> X, b -> X, d -> X)?

Answer

Andor Dávid picture Andor Dávid · Aug 30, 2015

Yes, you can do it.

In Github's terminology the "to branch" is "base" So the search phrase is: is:open is:pr base:X

Official description: Search based on branch names

Optionally you can add is:merged or is:unmerged filters as well.