0

我们正在使用 Renovate 来更新 Angular 项目中的依赖项。我们使用 Docker 映像自己托管它。现在,它正在更新所有依赖项,但我们希望它只更新我们自己的私有库,即下面的@acme/common:

module.exports = {
  "baseBranches": ["master", "Release"],
  "onboarding": true,
  "onboardingConfig": {
    "extends": [ "config:base" ]
  },
  "platform": "github",
  "packageRules": [
    {
      "matchBaseBranches": ["master"],
      "matchPackagePatterns": ["^@acme"],
      "rangeStrategy": "bump",
      "updateTypes": [
        "minor",
        "patch"
      ],
      "automerge": true,
      "automergeType": "branch"
    },
    {
      "matchBaseBranches": ["Release"],
      "matchPackagePatterns": ["common"],
      "rangeStrategy": "bump",
      "updateTypes": [
        "patch"
      ],
      "automerge": true,
      "automergeType": "branch"
    }
  ]
};

我如何让它只更新 packageRules 中定义的库?

根据这篇文章,你可以这样做:

{
  "extends": [
    "config:base"
  ],
  "enabledManagers": ["npm"],
  "packageRules": [
    {
      "packagePatterns": ["*"],
      "excludePackagePatterns": ["debug"],
      "enabled": false
    }
  ]
}

然而,它对我不起作用......

4

0 回答 0