是否可以选择 Dependabot 应打开 PR 的特定分支?

Sek*_*mty 25 git github dependabot

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

据我所见,它会针对存储库设置中设置为主要分支的分支打开 PR,但是否可以选择另一个分支?

fla*_*xel 23

根据文档,这可以通过选项实现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"
Run Code Online (Sandbox Code Playgroud)