Lim*_*nte 4 search github logical-operators pull-request
在这个搜索查询(现场测试↗)我正在寻找:
pull requests limonte(我)vaadin公司除了(逻辑非)vaadin公司的那些,我怎样才能搜索我的所有拉取请求?
我试过这两个选项没有成功:
is:pr author:limonte user:!vaadinis:pr author:limonte user:NOT vaadinMoh*_*imi 11
我认为这对每个对缩小结果范围的不同方法感到困惑的人都会有帮助:
NOT单词如果您想排除某个单词,则应该NOT在其之前使用关键字。
就我而言,我试图找到用 Go 编写的微服务项目(而不是框架)。
microservice NOT framework language:Go
microservice NOT framework NOT library language:Go
包括空白:
cats NOT "hello world"
-预选赛如果您尝试排除特定限定符,您应该使用-:
cats stars:>10 -language:javascript=> 除 javascript 之外的任何语言
mentions:defunkt -org:github=> 除 github 之外的任何组织
来源:https ://docs.github.com/en/search-github/getting-started-with-searching-on-github
使用a前缀任何搜索限定符 - 排除该限定符匹配的所有结果.
例如,您可能有兴趣找到所有"cat"存储库,其中包含超过10个不是用JavaScript编写的星形:
cats stars:>10 -language:javascript
Run Code Online (Sandbox Code Playgroud)
您可能还想查找提及@defunkt的所有问题,这些问题不在GitHub组织的存储库中:
mentions:defunkt -user:github
Run Code Online (Sandbox Code Playgroud)
你的问题的答案是:
有关更多信息,请参阅GitHub搜索语法
看起来您现在只能使用 NOT 这个词:
hello NOT world 匹配包含单词“hello”但不包含单词“world”的存储库。
https://help.github.com/en/articles/understanding-the-search-syntax
我厌倦了在搜索中进行单元测试,所以我是这样搜索的:
NOT test in:path AND "search-term" in:file
Run Code Online (Sandbox Code Playgroud)