From a533aa11125827478f6cc9675554ea641a2d4a5d Mon Sep 17 00:00:00 2001 From: Olivier ORAND Date: Thu, 5 Sep 2024 10:31:02 +0000 Subject: [PATCH] chore(renovate): restore comments --- renovate.json5 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index d8869422..66d05b0e 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,13 +1,15 @@ { $schema: 'https://docs.renovatebot.com/renovate-schema.json', extends: [ - 'config:best-practices', + 'config:best-practices', //See https://docs.renovatebot.com/upgrade-best-practices/#use-the-configbest-practices-preset ':disableRateLimiting', ], 'github-actions': { + // We use dependa-bot for this enabled: false, }, bundler: { + // We use dependa-bot for this enabled: false, }, baseBranches: [ @@ -49,12 +51,13 @@ { description: 'Add common labels', addLabels: [ + // See full list of fields available at https://docs.renovatebot.com/templates/#other-available-fields 'datasource/{{datasource}}', 'depName/{{depNameSanitized}}', 'manager/{{manager}}', ], matchDepNames: [ - '/*/', + '*', ], }, { @@ -65,10 +68,12 @@ ], }, { + // opt in for a PR for each K8S minor bump, e.G. 1.20.x to 1.21.y matchDepNames: 'kubernetes/kubectl', separateMultipleMinor: true, }, { + // Add checksums extraction tip to yq packaqe matchDepNames: 'mikefarah/yq', prBodyNotes: [ 'To easily extract checksums: yq_version=;curl -sSL https://github.com/mikefarah/yq/releases/download/v${jq_version}/checksums |grep "yq_linux_amd64 "|cut -d\' \' -f37', @@ -107,10 +112,11 @@ customManagers: [ { customType: 'regex', - fileMatch: [ - '.*/.*_spec\\.rb', - ], + fileMatch: ['.*/.*_spec\\.rb'], //https://regex101.com/r/rIOdcZ/1 matchStrings: [ + // https://docs.renovatebot.com/modules/manager/regex/#regular-expression-capture-groups + // The regex manager matches are done per-file and not per-line, + // you should be aware when using the ^ and/or $ regex assertions. '\\s*RUBY_VERSION\\s*=\\s*"(?[a-z0-9\\.\\/\\-\\+]*)".*', ], depNameTemplate: 'ruby', @@ -123,9 +129,15 @@ '.*/.*_spec\\.rb', ], matchStrings: [ + // For dockerfile: https://regex101.com/r/QUjPL3/3 'datasource=(?github-tags) depName=(?kubernetes/kubectl)\\nENV .+_VERSION ?\\"?(?[\\w\\d\\/\\-\\.\\_]+)\\"?\\s*', + // For spec files: https://regex101.com/r/ifWHDK/2 '.+_VERSION\\s*=\\s*[\\"\\\']?(?[\\w\\d\\/\\-\\.\\_]+)?[\\"\\\']?\\s* #\\s*renovate: datasource=(?github-tags) depName=(?kubernetes/kubectl)( versioning=(?.+))?\\s*', ], + //versioningTemplate: "regex:(?\\d+\\.\\d+)\\.(?\\d+)?$", => we cannot use this as renovate detect 1 instead of 1.24 as major + // Workaround for https://github.com/renovatebot/renovate/issues/6576#issuecomment-1233357263 New feature: separateMultiplePatch and separateMultipleMinor + //#6576 + // versioningTemplate: "regex:^(\\d+\\.)?(?\\d+)\\.(?\\d+)?$", extractVersionTemplate: '^(kubernetes-)?v?(?.*)$', }, { @@ -135,9 +147,12 @@ '.*/.*_spec\\.rb', ], matchStrings: [ + // For dockerfile: https://regex101.com/r/QUjPL3/3 'datasource=(?github-releases) depName=(?[\\w\\d\\//\\-\\_]+)\\nENV .+_VERSION ?\\"?(?[\\w\\d\\/\\-\\.\\_]+)\\"?\\s*', + // For spec files: https://regex101.com/r/ifWHDK/2 '.+_VERSION\\s*=\\s*[\\"\\\']?(?[\\w\\d\\/\\-\\.\\_]+)?[\\"\\\']?\\s* #\\s*renovate: datasource=(?github-releases) depName=(?[\\w\\d\\//\\-\\_]+)( versioning=(?.+))?\\s*', ], + // datasourceTemplate: "{{datasource}}", // should not be required as we extract datasource versioningTemplate: 'regex:(?\\d+)\\.(?\\d+)\\.(?\\d+)?$', extractVersionTemplate: '^v?(?.*)$', },