{"meta":{"title":"收件箱筛选器","intro":"了解如何在您的 GitHub 收件箱中过滤通知。","product":"订阅和通知","breadcrumbs":[{"href":"/zh/subscriptions-and-notifications","title":"订阅和通知"},{"href":"/zh/subscriptions-and-notifications/reference","title":"参考"},{"href":"/zh/subscriptions-and-notifications/reference/inbox-filters","title":"收件箱筛选器"}],"documentType":"article"},"body":"# 收件箱筛选器\n\n了解如何在您的 GitHub 收件箱中过滤通知。\n\n可以使用以下支持的筛选器为收件箱创建自定义筛选器。 有关创建自定义筛选器的详细信息，请参阅 [在收件箱中管理通知](/zh/subscriptions-and-notifications/how-tos/viewing-and-triaging-notifications/managing-notifications-from-your-inbox#customizing-your-inbox-with-custom-filters)。\n\n## 自定义过滤器限制\n\n自定义过滤器当前不支持：\n\n* 收件箱中的全文搜索，包括搜索拉取请求或议题标题\n* 区分 `is:issue`、`is:pr` 和 `is:pull-request` 查询筛选器。 这些查询将返回议题和拉取请求。\n* 创建超过 15 个自定义筛选条件\n* 更改默认筛选条件或其顺序\n* 使用 [](/zh/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax) 或 `NOT` 搜索`-QUALIFIER`\n\n## 支持的自定义过滤器查询\n\n以下是您可以使用的过滤器类型：\n\n* 使用 `repo:` 按存储库筛选\n* 使用 `is:` 按讨论类型筛选\n* 使用 `reason:`\n  按通知原因筛选\n* 使用 `author:` 按通知作者筛选\n* 按组织筛选 `org:`\n\n### 支持的 `repo:` 查询\n\n要添加 `repo:` 筛选器，必须在查询中包含存储库的所有者：`repo:owner/repository`。 所有者是拥有 GitHub 触发通知的资产的组织或用户。 例如，`repo:octo-org/octo-repo` 将会显示在 octo-org 组织内的 octo-repo 存储库中触发的通知。\n\n### 支持的 `is:` 查询\n\n若要筛选特定活动的 GitHub通知，可以使用 `is` 查询。 例如，若要仅查看存储库邀请更新，请使用 `is:repository-invitation`；若要仅查看 Dependabot alerts，请使用 `is:repository-vulnerability-alert`。\n\n* `is:check-suite`\n* `is:commit`\n* `is:gist`\n* `is:issue-or-pull-request`\n* `is:release`\n* `is:repository-invitation`\n* `is:repository-vulnerability-alert`\n* `is:repository-advisory`\n* `is:discussion`\n\n有关减少 Dependabot alerts 通知噪音的信息，请参阅 [为 Dependabot 警报配置通知](/zh/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/configure-dependabot-notifications)。\n\n还可使用 `is:` 查询来描述如何对通知进行分类。\n\n* `is:saved`\n* `is:done`\n* `is:unread`\n* `is:read`\n\n### 支持的 `reason:` 查询\n\n要根据收到更新的原因筛选通知，可使用 `reason:` 查询。 例如，要查看请求你（或所属团队）审查拉取请求时的通知，请使用 `reason:review-requested`。 有关详细信息，请参阅“[关于通知](/zh/subscriptions-and-notifications/concepts/about-notifications#reasons-for-receiving-notifications)”。\n\n| 查询                        | 说明                                |\n| ------------------------- | --------------------------------- |\n| `reason:assign`           | 分配给您的议题或拉取请求有更新时。                 |\n| `reason:author`           | 当您打开拉取请求或议题并且有更新或新评论时。            |\n| `reason:comment`          | 你对议题或拉取请求发表了评论。                   |\n| `reason:participating`    | 你对议题或拉取请求发表了评论或@mentioned。        |\n| `reason:invitation`       | 当您被邀请加入团队、组织或代码库时。                |\n| `reason:manual`           | 当你单击“订阅”\\*\\*\\*\\* 尚未订阅的议题或拉取请求时。   |\n| `reason:mention`          | 直接 @mentioned你时。                  |\n| `reason:review-requested` | 有人请求您或您所在的团队审查合并请求。               |\n| `reason:security-alert`   | 为仓库发出安全警报时。                       |\n| `reason:state-change`     | 当拉取请求或问题的状态改变时。 例如，议题已关闭或拉取请求合并时。 |\n| `reason:team-mention`     |                                   |\n| @mentioned你所属团队时。         |                                   |\n| `reason:ci-activity`      | 当仓库有 CI 更新时，例如新的工作流程运行状态。         |\n\n### 支持的 `author:` 查询\n\n要按用户筛选通知，可使用 `author:` 查询。 作者指你收到的通知中提及的会话的原始作者（例如，在问题、拉取请求、Gist 或讨论中）。 例如，要查看与 Octocat 用户创建的帖子相关的通知，可使用 `author:octocat`。\n\n### 支持的 `org:` 查询\n\n要按组织筛选通知，可使用 `org` 查询。 你需要在查询中指定的组织，是你在 GitHub 上收到通知的存储库所属的组织。 如果您属于多个组织，并且想要查看特定组织的通知，则此查询很有用。\n\n例如，要查看来自 octo-org 组织的通知，可使用 `org:octo-org`。\n\n## Dependabot 自定义筛选器\n\n如果用于 Dependabot 使依赖项保持最新状态，可以使用并保存以下自定义筛选器：\n\n* `is:repository_vulnerability_alert` 以显示 Dependabot alerts 的通知\n* `reason:security_alert` 以显示 Dependabot alerts 和安全更新拉取请求的通知。\n* `author:app/dependabot` 以显示由 Dependabot 生成的通知。 这包括Dependabot alerts、安全更新拉取请求和版本更新拉取请求。\n\n有关 Dependabot 的详细信息，请参阅 [Dependabot 警报](/zh/code-security/concepts/supply-chain-security/dependabot-alerts)。"}