renovate create only PR when packages major update

990 Views Asked by At

Problem

I am trying to manage package versions in my monorepo. (repository link is below.)
Now, renovate create only PR when package major update.

Sometimes renovate create minor update PRs, but I don't know what caused it.

This is my config files. (It was only recently changed, but I still can't even create a PR from the dashboard.)

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    ":timezone(Asia/Tokyo)",
    ":label(renovate)",
    ":semanticCommitTypeAll(feat)",
    "schedule:weekly"
  ],
  "labels": ["dependencies", "renovate"],
  "dependencyDashboard": true,
  "packageRules": [
    {
      "groupName": "all major dependencies",
      "groupSlug": "all-major",
      "matchPackagePatterns": ["*"],
      "matchUpdateTypes": ["major"]
    },
    {
      "groupName": "all minor and patch dependencies",
      "groupSlug": "all-minor-patch",
      "matchPackagePatterns": ["*"],
      "matchUpdateTypes": ["minor", "patch"]
    }
  ]
}

repository link is here

I expected that renovate work well.

1

There are 1 best solutions below

0
VonC On

Based on your Renovate configuration file, it is defined to only create Pull Requests (PRs) for major updates. However, you also defined another package rule right after the first one, which includes rules for both minor and patch updates, which could be the cause why you are seeing PRs for minor updates as well.

To make Renovate create PRs only for major updates, you will need to remove the second package rule that matches minor and patch updates.

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    ":timezone(Asia/Tokyo)",
    ":label(renovate)",
    ":semanticCommitTypeAll(feat)",
    "schedule:weekly"
  ],
  "labels": ["dependencies", "renovate"],
  "dependencyDashboard": true,
  "packageRules": [
    {
      "groupName": "all major dependencies",
      "groupSlug": "all-major",
      "matchPackagePatterns": ["*"],
      "matchUpdateTypes": ["major"]
    }
  ]
}

I removed the second package rule, which matched minor and patch updates. Now, Renovate should only create PRs when there is a major update to any of the packages.

If the issue persists, scrutinizing the logs may provide insights into any existing issues or why PRs are not created as expected. You can view the logs on your Renovate dashboard for detailed information on the run and any errors or issues it encountered.