diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..af5b24e8 --- /dev/null +++ b/.github/renovate.json5 @@ -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(?\\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(?\\d+\\.\\d+\\.\\d+)', + schedule: [ + '* * * * *', + ], + internalChecksFilter: 'strict', + }, + ] +}