mirror of
https://github.com/j178/prek.git
synced 2026-04-25 02:11:36 +02:00
169 lines
4.9 KiB
Plaintext
169 lines
4.9 KiB
Plaintext
{
|
|
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
|
|
extends: [
|
|
'config:recommended',
|
|
// https://docs.renovatebot.com/presets-default/#configmigration
|
|
':configMigration',
|
|
// https://docs.renovatebot.com/presets-customManagers/#custommanagersgithubactionsversions
|
|
// Update _VERSION environment variables in GitHub Action files.
|
|
'customManagers:githubActionsVersions',
|
|
],
|
|
// release.yml is generated by cargo-dist and should not be updated.
|
|
ignorePaths: [
|
|
'.github/workflows/release.yml'
|
|
],
|
|
schedule: ["* 0-3 * * 1"],
|
|
prHourlyLimit: 10,
|
|
labels: [
|
|
'internal'
|
|
],
|
|
// Refresh lock files to keep them up-to-date
|
|
lockFileMaintenance: {
|
|
enabled: true,
|
|
groupName: 'Lock file maintenance',
|
|
},
|
|
semanticCommits: 'disabled',
|
|
// pre-commit is currently in beta testing, must opt in
|
|
'pre-commit': {
|
|
enabled: true
|
|
},
|
|
cargo: {
|
|
// See https://docs.renovatebot.com/configuration-options/#rangestrategy
|
|
rangeStrategy: "update-lockfile",
|
|
managerFilePatterns: ["/^Cargo\\.toml$/", "/^crates/.*Cargo\\.toml$/"],
|
|
},
|
|
enabledManagers: [
|
|
'github-actions',
|
|
'pre-commit',
|
|
'cargo',
|
|
'custom.regex',
|
|
'pep621',
|
|
],
|
|
customManagers: [
|
|
// Update `uv` version in `crates/prek/src/languages/python/uv.rs` and CI workflows.
|
|
{
|
|
customType: 'regex',
|
|
managerFilePatterns: [
|
|
'/src/languages/python/uv.rs$/',
|
|
'/.github/workflows/.*\\.yml$/',
|
|
],
|
|
datasourceTemplate: 'pypi',
|
|
packageNameTemplate: 'uv',
|
|
matchStrings: [
|
|
'const\\s+CUR_UV_VERSION\\s*:\\s*&str\\s*=\\s*"(?<currentValue>\\d+\\.\\d+\\.\\d+)"',
|
|
'UV_VERSION:\\s*"(?<currentValue>\\d+\\.\\d+\\.\\d+)"',
|
|
]
|
|
},
|
|
// Update major GitHub actions references in documentation.
|
|
{
|
|
customType: 'regex',
|
|
managerFilePatterns: [
|
|
'/README\\.md$/',
|
|
'/^docs/.*\\.md$/'
|
|
],
|
|
matchStrings: [
|
|
'\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentValue>.+?)\\s',
|
|
],
|
|
datasourceTemplate: 'github-tags',
|
|
versioningTemplate: 'regex:^v(?<major>\\d+)$',
|
|
},
|
|
// Minimum supported Rust toolchain version
|
|
{
|
|
customType: "regex",
|
|
managerFilePatterns: ["/(^|/)Cargo\\.toml$/"],
|
|
matchStrings: [
|
|
'rust-version\\s*=\\s*"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)"',
|
|
],
|
|
depNameTemplate: "msrv",
|
|
packageNameTemplate: "rust-lang/rust",
|
|
datasourceTemplate: "github-releases",
|
|
},
|
|
// Rust toolchain version
|
|
{
|
|
customType: "regex",
|
|
managerFilePatterns: ["/(^|/)rust-toolchain\\.toml$/"],
|
|
matchStrings: [
|
|
'channel\\s*=\\s*"(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)"',
|
|
],
|
|
depNameTemplate: "rust",
|
|
packageNameTemplate: "rust-lang/rust",
|
|
datasourceTemplate: "github-releases",
|
|
}
|
|
],
|
|
packageRules: [
|
|
// Group all GitHub Actions updates together
|
|
{
|
|
groupName: 'GitHub Actions',
|
|
matchManagers: ['github-actions'],
|
|
matchDepTypes: ['action'],
|
|
// Pin GitHub Actions to immutable SHAs
|
|
pinDigests: true
|
|
},
|
|
// rui314/setup-mold publishes tags, but not GitHub releases.
|
|
{
|
|
matchManagers: ['github-actions'],
|
|
matchDepTypes: ['action'],
|
|
matchDepNames: ['rui314/setup-mold'],
|
|
overrideDatasource: 'github-tags',
|
|
},
|
|
{
|
|
groupName: 'pre-commit',
|
|
matchManagers: ['pre-commit'],
|
|
matchFileNames: ['.pre-commit-config.yaml']
|
|
},
|
|
// Annotate GitHub Actions SHAs with a SemVer version.
|
|
{
|
|
extends: [
|
|
'helpers:pinGitHubActionDigests'
|
|
],
|
|
extractVersion: '^(?<version>v?\\d+\\.\\d+\\.\\d+)$',
|
|
versioning: 'regex:^v?(?<major>\\d+)(\\.(?<minor>\\d+)\\.(?<patch>\\d+))?$'
|
|
},
|
|
// Disable updates for GitHub runners: we'd only pin them to a specific version
|
|
// if there was a deliberate reason to do so
|
|
{
|
|
groupName: 'GitHub runners',
|
|
matchManagers: [
|
|
'github-actions'
|
|
],
|
|
matchDatasources: [
|
|
'github-runners'
|
|
],
|
|
description: "Disable PRs updating GitHub runners (e.g. 'runs-on: macos-14')",
|
|
enabled: false
|
|
},
|
|
// Disable updates for the msvc-dev-cmd action, the latest version does not work.
|
|
{
|
|
matchManagers: [
|
|
"github-actions"
|
|
],
|
|
matchDepTypes: [
|
|
"action"
|
|
],
|
|
matchDepNames: [
|
|
"ilammy/msvc-dev-cmd"
|
|
],
|
|
enabled: false
|
|
},
|
|
{
|
|
matchManagers: ["custom.regex"],
|
|
matchDepNames: ["rust"],
|
|
commitMessageTopic: "Rust",
|
|
},
|
|
{
|
|
matchManagers: [ 'cargo', 'pre-commit', 'github-actions', 'pep621', 'custom.regex' ],
|
|
minimumReleaseAge: '7 days'
|
|
},
|
|
{
|
|
commitMessageTopic: "MSRV",
|
|
matchManagers: ["custom.regex"],
|
|
matchDepNames: ["msrv"],
|
|
// We have a rolling support policy for the MSRV
|
|
// 2 releases back * 6 weeks per release * 7 days per week + 1
|
|
minimumReleaseAge: "85 days",
|
|
internalChecksFilter: "strict",
|
|
groupName: "MSRV",
|
|
}
|
|
]
|
|
}
|