Reputation: 193
Tried a lot of searching in Github docs and also stackoverflow. Couldn't find a descent example to show how we can filter PRs with logical negation operator
Let's say I want to filter all the PRs which are closed
and does not have AutoDeploy
in title.
Tried the following but it does not work.
is:pr is:closed -in:title "AutoDeploy"
Upvotes: 3
Views: 1540
Reputation: 1323953
From "Understanding the search syntax", you can indeed prefix any search qualifier with a -
to exclude all results that are matched by that qualifier.
However, that seems to apply to repository search only, not issue and PR search, where the exclusion operator does nothing on the 'in
' qualifier.
You might need to list all pr, and then subtract the one with AutoDeploy (or grep -v to exclude them)
Using the GitHub CLI command gh pr list
can help post-processing the results.
gh pr list --search "is:closed" | grep -v "AutoDeploy"
Upvotes: 3