How to search for a Pull Request based on a branch name – 025

In yesterday’s tip, it was easy to find the desired Pull Request when there’s only been one Pull Request created. Today, let’s say that you want to restore a deleted branch, but you need to search for the Pull Request to get to the Restore button. Deleted branches aren’t shown on the Branches page.

Navigate to the Pull Request tab, and in the search field, 1. delete the search defaults and 2. type in

head:<branch-name>

Notice you’re using head: as the search parameter because there are two branches involved in a Pull Request. The base branch is the branch that the changes are going into. The head branch is the source of those changes.

searching pull requests for head:readme-draft

And in the above screenshot, you see the Updated the readme PR that contains the readme-draft.

You can also search based on base branch using the base:<branch-name> search option. Check out the search documentation for more information.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s