跳至主要内容

使用 GitHub 预设规则对 Dependabot 警报进行优先级排序

通过自动忽略 npm 依赖的低影响开发警报,专注于重要的警报。

谁可以使用此功能?

  • 组织所有者
  • 安全管理员
  • 拥有 admin 权限的用户(可为仓库启用、禁用并查看 GitHub 预设)

本文内容

先决条件

在为仓库启用 GitHub 预设之前,您应了解它们的功能和目的。请参阅 关于 Dependabot 自动分流规则

启用 GitHub 预设规则

  1. 在 GitHub 上,导航至仓库的主页面。

  2. 在仓库名称下,点击 设置。如果看不到 “Settings” 选项卡,请选择 下拉菜单,然后点击 设置

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. 在侧边栏的Security部分,点击 Advanced Security

  4. 在 “Dependabot” 部分,点击 “Dependabot rules” 右侧的.

    Screenshot of the "Advanced Security" page for a repository. The gear icon is highlighted with an orange outline.

  5. 在 “GitHub presets” 部分,点击您想启用的规则右侧的.

  6. 在 “State” 部分,选择下拉菜单,然后点击 已启用

  7. 点击 保存规则

© . This site is unofficial and not affiliated with GitHub, Inc.