github - 如何让dependabot仅触发安全更新

标签 github dependabot

我正在使用 GitHub Dependabot.yml,版本 2。

version: 2
updates:
  # Nuget Packages
  - package-ecosystem: "nuget"
    directory: "/"
    schedule:
      interval: "monthly"
我试图弄清楚是否有可能将它配置为仅当它们包含安全修复程序时才会更新依赖项,因为它可以为版本 1 完成
version: 1
update_configs:
 - package_manager: "dotnet:nuget"
   directory: "/"
   update_schedule: "monthly"
   allowed_updates:
     - match:
       update_type: "security"
让我知道您是否遇到了同样的问题以及您是如何解决的。
谢谢

最佳答案

是的,我遇到了同样的问题,然后我发现了这样的问题 github community thread .

I remembered where I saw this. When using the original dependabot from the marketplace one configuration option is to only perform security updates. I have that set from one of my repositories. There is now an option in the original dependabot to generate a dependabot.yml configuration file using the settings configured in the original dependabot (to assist in transitioning to using dependabot.yml). When I do so for the repository with only security updates enabled I receive this message:


You’re using unsupported features This repository is configured to only scan for security updates. Configuring security updates using the new config file is not supported. You can instead enable Dependabot Security Updates from the repository security settings page 18.


听起来像是在dependabot v2 中,他们已经将安全更新分离到UI 配置中,这与GitHub 操作 secret 一样糟糕。但是看起来您不再需要依赖机器人来为依赖项配置安全补丁。
如果这有帮助,请告诉我。

关于github - 如何让dependabot仅触发安全更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64047526/

相关文章:

github - dependabot 只更新锁定文件

config - 如何更改我的 dependabot 配置以排除主要版本

git - 从分支中删除存储库名称前缀

git - 如何从 github 上的 Git 分支中删除不需要的文件(如元数据)

git - 在没有远程的情况下创建 git 子模块

Github 使用 : delete and recreate a fork?

git - 在不禁用权威签名证书的情况下添加自签名 SSL 证书

github - 为复合操作中使用的操作启用 GitHub Dependabot 更新