簡體   English   中英

GitHub 搜索 - 如何從搜索結果中排除(邏輯非)公司或用戶

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

在此搜索查詢( 現場測試↗ )中,我正在搜索:

  • 所有pull requests
  • by 用戶limonte (我)
  • 對於vaadin公司

我如何搜索我的所有拉取請求,除了(邏輯非) vaadin公司的那些?


我嘗試了這兩個選項但沒有成功:

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

使用a前綴任何搜索限定符 - 排除該限定符匹配的所有結果。

例如,您可能有興趣找到所有“cat”存儲庫,其中包含超過10個不是用JavaScript編寫的星形:

cats stars:>10 -language:javascript

您可能還想查找提及@defunkt的所有問題,這些問題不在GitHub組織的存儲庫中:

mentions:defunkt -user:github

你的問題的答案是:

是:pr作者:limonte -user:vaadin


有關更多信息,請參閱GitHub搜索語法

看起來你現在可以使用NOT這個詞:

你好世界上沒有匹配“hello”這個詞而不是“world”這個詞的知識庫。

https://help.github.com/en/articles/understanding-the-search-syntax

我厭倦了在搜索中進行單元測試,所以我這樣搜索:

NOT test in:path AND "search-term" in:file

我認為這對於在縮小結果的不同方法之間感到困惑的每個人都會有所幫助:


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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM