renovatebot / config-help

Please use the Discussions feature of https://github.com/renovatebot/renovate instead

Home Page:https://github.com/renovatebot/renovate/discussions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create pull requests per updated files

suzuki-shunsuke opened this issue · comments

Which Renovate are you using?

WhiteSource Renovate App

Which platform are you using?

GitHub.com

Have you checked the logs? Don't forget to include them if relevant

What would you like to do?

I want to split pull requests per updated files.
I try to use additionalBranchPrefix,
but it seems that parentDir is not full path but the parent directory name, and if the parent directory name is same, the updates are included in the same pull request.

https://github.com/suzuki-shunsuke/test-renovate-2/blob/c69b1a5bf7e55d1f116da8b733f82fa51b790f02/renovate.json

{
  "packageRules": [
    {
      "managers": ["terraform"],
      "additionalBranchPrefix": "{{parentDir}}-",
      "packagePatterns": [".*"]
    }
  ]
}

directory structure

services/
  foo/
    staging/
      provider.tf
    production/
      provider.tf
  bar/
    staging/
      provider.tf
    production/
      provider.tf

provider.tf

provider "aws" {
  version = "~> 2.50.0"
}

There are four provider.tf and I want to update them by separated pull requests.
But actually foo/staging/provider.tf and bar/staging/provider.tf are upgraded in the same pull request.

Try baseDir instead of parentDir. Ref: https://docs.renovatebot.com/templates/