返回
创建于
状态公开

Google 搜索的语法:

  1. " ": 使用引号来搜索确切的词组或者句子。例如,"北京烤鸭" 将只显示包含这个确切短语的结果。
  2. OR: 使用 OR 来搜索两个或更多的词。例如,"北京烤鸭 OR 水饺" 将显示包含 "北京烤鸭" 或 "水饺" 的结果。
  3. -: 使用减号排除特定的词。例如,"北京烤鸭 -鸭子" 将排除包含 "鸭子" 的所有结果。
  4. *: 使用星号作为通配符。例如, "最好的 * 书" 可以显示 "最好的 python 书"、"最好的 厨艺书" 等结果。
  5. ..: 使用两个点号来表示数值范围。例如, "电视 2000..3000 元" 将显示在 2000 到 3000 元之间的电视。
  6. site:: 使用 "site:" 搜索特定网站的内容。例如, "site:nytimes.com 北京烤鸭" 将只显示纽约时报网站上的关于北京烤鸭的文章。
  7. filetype:: 使用 "filetype:" 来搜索特定类型的文件。例如, "python 学习 filetype:pdf" 将只显示 PDF 文件。
  8. related:: 使用 "related:" 来找到与特定网站相关的网站。例如, "related:openai.com" 将显示与 OpenAI 相关的其他网站。

GitHub 搜索的语法:

  1. " ": 用引号来搜索包含确切短语的内容。
  2. NOT-:使用 NOT 或者减号排除某个词。例如,"github NOT microsoft" 将排除包含 "microsoft" 的结果。
  3. OR: 使用 OR 来搜索多个词。例如,"AI OR ML" 将显示包含 "AI" 或 "ML" 的结果。
  4. user:org::使用 "user:" 或 "org:" 来搜索特定用户或组织的仓库。例如, "user:torvalds linux" 将搜索 Torvalds 用户下与 Linux 相关的仓库。
  5. in:namein:descriptionin:readme:可以使用 "in:" 关键字来在仓库名、描述或 README 中进行搜索。例如, "AI in:description" 将搜索描述中包含 "AI" 的仓库。
  6. stars::用 "stars:" 来搜索特定星标范围的仓库。例如, "stars:>=100" 将显示有 100 或以上星标的仓库。
  7. fork:truefork:only:用 "fork:true" 来在源仓库和分支仓库中搜索,用 "fork:only" 来只在分支仓库中搜索。
  8. language::使用 "language:" 来按照特定编程语言进行搜索。例如, "language:python ML" 将搜索 Python 语言中与 ML 相关的仓库。

注意:如果你的搜索语句包含特殊字符(比如 .:/ 等),你可能需要在它们前面加上 \ 来使其有效。例如,你需要搜索 user-content,那么搜索语句就应该是 user\-content

希望这些搜索技巧可以帮助你更有效地找到所需要的信息!

如果你想在 GitHub 上查看某个人的所有 PR(Pull Requests)和 Issues,你可以使用以下的方法:

Pull Requests

  1. 在搜索框中,输入 is:pr author:USERNAME,其中 USERNAME 是你想要查找的 GitHub 用户名。
  2. Enter 或者点击搜索按钮。

Issues

  1. 在搜索框中,输入 is:issue author:USERNAME,其中 USERNAME 是你想要查找的 GitHub 用户名。
  2. Enter 或者点击搜索按钮。

注意,你可以添加 repo:OWNER/REPO 到你的搜索中以便限制结果在某个特定的仓库。例如,如果你想查看某个用户在特定仓库的所有 PR,你可以输入 is:pr author:USERNAME repo:OWNER/REPO

在这里 OWNER 是仓库的所有者,REPO 是仓库的名字。

更多用法

GitHub 提供了一套全面的搜索语法,以帮助你更精确地查找信息。以下是一些更多的高级搜索技巧:

  1. is:openis:closed:用来搜索打开或关闭的 Issues 或 Pull Requests。例如,is:pr is:open author:USERNAME 会搜索指定用户的所有打开的 Pull Requests。
  2. created:updated::用来搜索在特定日期或日期范围内创建或更新的 Issues 或 Pull Requests。例如,is:issue author:USERNAME created:2020-01-01..2020-12-31 会搜索指定用户在 2020 年内创建的所有 Issues。
  3. comments::用来搜索有特定数量评论的 Issues 或 Pull Requests。例如,is:pr author:USERNAME comments:>=10 会搜索指定用户的评论数大于或等于 10 的所有 Pull Requests。
  4. review:approvedreview:changes_requestedreviewed-by::用来搜索已审批、需要更改或被特定用户审查的 Pull Requests。例如,is:pr author:USERNAME review:approved 会搜索指定用户的所有已经被审批的 Pull Requests。
  5. assignee::用来搜索被特定用户分配的 Issues 或 Pull Requests。例如,is:issue assignee:USERNAME 会搜索被指定用户分配的所有 Issues。
  6. mentions::用来搜索提及特定用户的 Issues 或 Pull Requests。例如,is:pr mentions:USERNAME 会搜索提及指定用户的所有 Pull Requests。

Search by when a pull request was merged

You can filter pull requests based on when they were merged, using the merged qualifier.

This qualifier takes a date as its parameter. Date formatting must follow the ISO8601 standard, which is YYYY-MM-DD (year-month-day). You can also add optional time information THH:MM:SS+00:00 after the date, to search by the hour, minute, and second. That's T, followed by HH:MM:SS (hour-minutes-seconds), and a UTC offset (+00:00).

When you search for a date, you can use greater than, less than, and range qualifiers to further filter results. For more information, see "Understanding the search syntax."

QualifierExample
language:LANGUAGE merged:<YYYY-MM-DDlanguage:javascript merged:<2011-01-01 matches pull requests in JavaScript repositories that were merged before 2011.
in:title language:LANGUAGE merged:>YYYY-MM-DDfast in:title language:ruby merged:>=2014-05-01 matches pull requests in Ruby with the word "fast" in the title that were merged after May 2014.

Search based on whether a pull request is merged or unmerged

You can filter pull requests based on whether they're merged or unmerged using the is qualifier.

QualifierExample
is:mergedbug is:pr is:merged matches merged pull requests with the word "bug."
is:unmergederror is:unmerged matches pull requests with the word "error" that are either open or were closed without being merged.

举个栗子

点击直达我提交的被合并的PR:https://github.com/search?q=is%3Apr+author%3Apowerfulyang+is%3Amerged+&type=pullrequests