Add Renovate configuration

This adds a configuration to enable Renovate to do some basic automated
updates.
This commit is contained in:
Eric Huss
2025-09-24 15:55:16 -07:00
parent aa96e1174e
commit 7dee816838

71
.github/renovate.json5 vendored Normal file
View File

@@ -0,0 +1,71 @@
{
schedule: ['before 5am on the first day of the month'],
// Raise from default of 2 to reduce trickle.
prHourlyLimit: 6,
dependencyDashboard: true,
// Creates PRs if this renovate config file needs updating.
configMigration: true,
ignorePaths: [
'guide/src/for_developers/mdbook-wordcount/',
],
customManagers: [
// Custom manager to extract the version of cargo-semver-checks from the workflow.
{
customType: 'regex',
managerFilePatterns: [
'/^.github.workflows.main.yml$/',
],
matchStrings: [
'cargo-semver-checks.releases.download.v(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
],
depNameTemplate: 'cargo-semver-checks',
packageNameTemplate: 'obi1kenobi/cargo-semver-checks',
datasourceTemplate: 'github-releases',
},
],
packageRules: [
// The next two rules disable compatible dependency updates. I wasn't
// able to get Renovate to be able to update Cargo.toml for compatible
// updates only, update all transitive dependencies, and do that all
// in a single PR. Instead, the `update-dependencies.sh` will handle
// that.
{
matchManagers: ['cargo'],
matchUpdateTypes: ['patch'],
enabled: false,
},
{
matchManagers: ['cargo'],
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: ['minor'],
enabled: false,
},
// Allow minor updates for pre-1.0 dependencies (semver-breaking)
{
matchManagers: ['cargo'],
matchCurrentVersion: '<1.0.0',
matchUpdateTypes: ['minor'],
},
// Allow major updates for stable dependencies (semver-breaking)
{
matchManagers: ['cargo'],
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: ['major'],
},
// Update cargo-semver-checks when a new version is available.
{
commitMessageTopic: 'cargo-semver-checks',
matchManagers: [
'custom.regex',
],
matchDepNames: [
'cargo-semver-checks',
],
extractVersion: '^v(?<version>\\d+\\.\\d+\\.\\d+)',
schedule: [
'* * * * *',
],
internalChecksFilter: 'strict',
},
]
}