{
  extends: [
    'config:best-practices',
    ':separateMultipleMajorReleases',
    'schedule:daily',
    'security:openssf-scorecard',
  ],
  commitMessageSuffix: ' in {{packageFile}}',
  dependencyDashboardAutoclose: true,
  automerge: true,
  baseBranchPatterns: [
    'main',
    '/^release-.*/',
  ],
  platformAutomerge: true,
  labels: [
    'dependencies',
  ],
  postUpdateOptions: [
    'gomodTidy',
    'gomodUpdateImportPaths',
    'npmDedupe',
  ],
  prHourlyLimit: 1,
  minimumReleaseAge: '5 days',
  osvVulnerabilityAlerts: true,
  vulnerabilityAlerts: {
    enabled: true,
    labels: [
      'security',
    ],
  },
  packageRules: [
    // enable release branches for security updates
    {
      matchBaseBranches: [
        '/^release-.*/',
      ],
      matchUpdateTypes: [
        'security',
      ],
      enabled: true,
    },
    // disable release branches for anything else
    {
      matchBaseBranches: [
        '/^release-.*/',
      ],
      enabled: false,
    },
    {
      matchBaseBranches: [
        'main',
      ],
      matchFileNames: [
        'package.json',
        'package-lock.json',
      ],
    },
    {
      matchFileNames: [
        'testing/**',
      ],
      additionalBranchPrefix: '{{packageFileDir}}-',
      groupName: 'conftest-testing',
      matchPackageNames: [
        '/conftest/',
      ],
    },
    {
      ignorePaths: [
        'testing/**',
      ],
      groupName: 'github-',
      matchPackageNames: [
        '/github-actions/',
      ],
    },
    {
      ignorePaths: [
        'server/controllers/events/testdata/**/*.tf',
      ],
      matchDatasources: [
        'terraform',
      ],
    },
    {
      matchDatasources: [
        'docker',
      ],
      matchPackageNames: [
        'node',
        'cimg/node',
      ],
      versioning: 'node',
    },
    {
      matchPackageNames: [
        'go',
        'golang',
      ],
      versioning: 'go',
      groupName: 'go',
    },
  ],
  customManagers: [
    {
      customType: 'regex',
      managerFilePatterns: [
        '/(^|/)Dockerfile$/',
        '/(^|/)Dockerfile\\.[^/]*$/',
      ],
      matchStrings: [
        'renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s(ARG|ENV) .*?_VERSION=(?<currentValue>.*)\\s',
      ],
      versioningTemplate: '{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}',
      extractVersionTemplate: '^v(?<version>\\d+\\.\\d+\\.\\d+)',
    },
    {
      customType: 'regex',
      managerFilePatterns: [
        '/.*go$/',
      ],
      matchStrings: [
        '\\sconst .*Version = "(?<currentValue>.*)"\\s// renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s',
      ],
      versioningTemplate: '{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}',
      extractVersionTemplate: '^v(?<version>\\d+\\.\\d+\\.\\d+)',
    },
    {
      customType: 'regex',
      managerFilePatterns: [
        '/^\\.github/workflows/[^/]+\\.ya?ml$/',
        '/Makefile$/',
      ],
      matchStrings: [
        'renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s.*?_VERSION: (?<currentValue>.*)\\s',
      ],
      versioningTemplate: '{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}',
      extractVersionTemplate: '^v(?<version>\\d+\\.\\d+\\.\\d+)',
    },
  ],
}
