GitHub search - how to exclude (logical NOT) company or user from search results

Limon Monte picture Limon Monte · Apr 4, 2017 · Viewed 8.9k times · Source

In this search query (test it live ↗) I'm searching for:

  • all pull requests
  • by user limonte (me)
  • for the vaadin company

How can I search for all my pull requests except (logical NOT) those for vaadin company?


These two options I tried without success:

  • is:pr author:limonte user:!vaadin
  • is:pr author:limonte user:NOT vaadin

Answer

Nilay Vishwakarma picture Nilay Vishwakarma · Apr 7, 2017

Prefixing any search qualifier with a - excludes all results that are matched by that qualifier.

For example, you might be interested in finding all "cats" repositories with more than 10 stars that are not written in JavaScript:

cats stars:>10 -language:javascript

You might also want to find all issues mentioning @defunkt that are not in repositories in the GitHub organization:

mentions:defunkt -user:github

The answer for your question is:

is:pr author:limonte -user:vaadin


For more refer the GitHub Search Syntax