gitgithubpull-request

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


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:

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


Solution

  • 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.