diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c33253e..9c80ffc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,3 +69,10 @@ repos: # and checks these with shellcheck. This is arguably its most useful feature, # but the integration only works if shellcheck is installed - "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.11.1" + + - repo: https://github.com/renovatebot/pre-commit-hooks + rev: 43.110.2 + hooks: + - id: renovate-config-validator + args: ["--strict"] + files: ".*\\.json5$" diff --git a/renovate-base.json5 b/renovate-base.json5 new file mode 100644 index 0000000..892d6e6 --- /dev/null +++ b/renovate-base.json5 @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: Copyright (C) 2025 Opal Health Informatics Group +// +// SPDX-License-Identifier: MIT + +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + // Extend a best-practices base preset + // See: https://github.com/mschoettle/renovate-presets#best-practices + "github>mschoettle/renovate-presets//presets/best-practices.json5", + ], + // https://docs.renovatebot.com/configuration-options/#labels + "labels": ["dependencies"], + "packageRules": [ + // Combine reuse-tool and reuse-action updates + { + "matchPackageNames": ["/reuse-tool/", "/reuse-action/"], + "groupName": "reuse", + }, + // Combine Docker actions + { + "matchManagers": ["github-actions"], + "matchPackageNames": ["/docker\\//"], + }, + // Combine download and upload artifact actions + { + "matchManagers": ["github-actions"], + "matchPackageNames": ["actions/upload-artifact", "actions/download-artifact"], + }, + ], +} diff --git a/renovate.json5 b/renovate.json5 index b28879e..e7c8250 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -5,29 +5,15 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:recommended", - // https://docs.renovatebot.com/presets-default/#separatemultiplemajorreleases - ":separateMultipleMajorReleases", + "github>opalmedapps/.github//renovate-base.json5", // set timezone to local one to ensure schedules are run // https://docs.renovatebot.com/configuration-options/#timezone ":timezone(America/Toronto)", - // https://docs.renovatebot.com/presets-default/#configmigration - ":configMigration", // https://docs.renovatebot.com/presets-customManagers/#custommanagersgithubactionsversions "customManagers:githubActionsVersions", - // https://docs.renovatebot.com/presets-helpers/#helperspingithubactiondigeststosemver - "helpers:pinGitHubActionDigestsToSemver", - "github>mschoettle/renovate-presets//presets/pre-commit-hooks.json5", ], // https://docs.renovatebot.com/configuration-options/#assignees - "assignees": ["mschoettle"], - // https://docs.renovatebot.com/configuration-options/#labels - "labels": ["dependencies"], - // Only rebase existing MRs when the branch is conflicted - // This avoids getting spammed by updates to existing PRs - // - // https://docs.renovatebot.com/configuration-options/#rebasewhen - "rebaseWhen": "conflicted", + "assignees": [], // https://docs.renovatebot.com/configuration-options/#packagerules "packageRules": [ // Exclude markdownlint-cli2 and reuse-tool pre-commit hooks from the pre-commit hooks group @@ -41,11 +27,6 @@ "!/reuse-tool/", ], }, - // Combine markdownlint-cli2 updates - { - "matchPackageNames": ["/markdownlint-cli2/"], - "groupName": "markdownlint-cli2", - }, // Combine reuse-tool and reuse-action updates { "matchPackageNames": ["/reuse-tool/", "/reuse-action/"],