【问题标题】:Is it possible to select a specific branch against which Dependabot should open PR's?是否可以选择 Dependabot 应该打开 PR 的特定分支?
【发布时间】:2021-04-13 20:17:34
【问题描述】:

正如标题所说,在 GitHub 上是否可以手动选择 Dependabot 应该打开其 Pull Requests 的分支?

据我所见,它会针对在 repo 设置中设置为主分支的任何一个分支打开 PR,但可以选择另一个分支?

【问题讨论】:

    标签: git github dependabot


    【解决方案1】:

    根据documentation,这可以通过选项target-branch 实现。例如,如果您想从分支develop 获取更新,您可以为python pip 环境编写以下配置:

    version: 2
    updates:
      - package-ecosystem: "pip"
        directory: "/"
        schedule:
          interval: "daily"
        # Raise pull requests for version updates
        # to pip against the `develop` branch
        target-branch: "develop"
        # Labels on pull requests for version updates only
        labels:
          - "pip dependencies"
    

    【讨论】:

    • 比你,我忽略了这一点。文档还报告了这个When you use this option, the settings for this package manager will no longer affect any pull requests raised for security updates.,它到底是什么意思?
    • 这只是意味着你不能为安全更新设置目标分支,如果我理解正确的话。 IE。包管理器的设置对安全更新没有影响。
    猜你喜欢
    • 2022-08-14
    • 2019-11-29
    • 2021-07-04
    • 1970-01-01
    • 2020-04-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-03
    相关资源
    最近更新 更多