【问题标题】:How to disable or ignore Dependabot pull requests?如何禁用或忽略 Dependabot 拉取请求?
【发布时间】:2022-06-14 13:09:21
【问题描述】:

我们希望使用 Dependabot 来了解更新的依赖项,但我们不希望 Dependabot 自行创建拉取请求并且不希望自动构建(我们使用 GitHub 进行代码,使用 Azure DevOps 进行构建)。

文档 (https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions) 中没有明确的提示来执行此操作。 我们已经尝试排除dependabot 分支,但这在任何形式下都不起作用。

# Azure DevOps Excludes
pr:
  autoCancel: "true"
  branches:
    exclude:
    - dependabot/*
    - dependabot/**/*

我们还在 StackOverflow 上找到了将限制设置为 0 的提示,但仍然会创建 PR

version: 2
updates:
  - directory: "/"
    open-pull-requests-limit: 0

是否有可能将 Dependabot 用作信息源?

【问题讨论】:

    标签: github azure-devops dependabot


    【解决方案1】:

    默认情况下,Dependabot 将自动重置拉取请求以解决任何冲突。如果您更喜欢手动处理合并冲突,可以使用 rebase-strategy 选项禁用此功能。

    对于变基策略,使用disabled 禁用自动变基。

    设置此选项还将影响对此包管理器清单文件的安全更新的拉取请求,除非您使用 target-branch 检查非默认分支上的版本更新。

    rebase-strategy 为例,

    version: 2
    
    updates:
    
      - directory: "/"
    
        schedule:
    
          interval: "daily"
    
        # Disable Dependabot pull requests
    
        rebase-strategy: "disabled"
    

    【讨论】:

      猜你喜欢
      • 2022-08-16
      • 1970-01-01
      • 2021-11-14
      • 1970-01-01
      • 2015-04-26
      • 1970-01-01
      • 1970-01-01
      • 2020-08-14
      • 1970-01-01
      相关资源
      最近更新 更多