Update renovate.json5

To adjust the Renovate configuration to ensure the rebase strategy is correctly applied, here is an updated snippet with a focus on the rebaseWhen setting
This commit is contained in:
Yuva 2024-12-25 10:58:47 +05:30 committed by GitHub
parent 8770905186
commit 11b31e098b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,15 +4,11 @@
'config:recommended', 'config:recommended',
'customManagers:dockerfileVersions', 'customManagers:dockerfileVersions',
':labels(dependencies)', ':labels(dependencies)',
':prConcurrentLimitNone', // Remove limit for open PRs at any time. ':prConcurrentLimitNone', // Remove limit for open PRs at any time
':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour. ':prHourlyLimit2' // Rate limit PR creation to a maximum of two per hour
], ],
rebaseWhen: 'conflicted', rebaseWhen: 'always', // Always rebase PRs to keep them up-to-date
minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it
// packageRules order is important, they are applied from top to bottom and are merged,
// meaning the most important ones must be at the bottom, for example grouping rules
// If we do not want a package to be grouped with others, we need to set its groupName
// to `null` after any other rule set it to something.
dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).', dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).',
postUpdateOptions: ['yarnDedupeHighest'], postUpdateOptions: ['yarnDedupeHighest'],
packageRules: [ packageRules: [
@ -20,10 +16,8 @@
// Require Dependency Dashboard Approval for major version bumps of these node packages // Require Dependency Dashboard Approval for major version bumps of these node packages
matchManagers: ['npm'], matchManagers: ['npm'],
matchPackageNames: [ matchPackageNames: [
'tesseract.js', // Requires code changes 'tesseract.js',
'react-hotkeys', // Requires code changes 'react-hotkeys',
// Requires Webpacker upgrade or replacement
'@svgr/webpack', '@svgr/webpack',
'@types/webpack', '@types/webpack',
'babel-loader', 'babel-loader',
@ -39,52 +33,50 @@
'webpack-bundle-analyzer', 'webpack-bundle-analyzer',
'webpack-dev-server', 'webpack-dev-server',
'webpack-cli', 'webpack-cli',
// react-router: Requires manual upgrade
'history', 'history',
'react-router-dom', 'react-router-dom'
], ],
matchUpdateTypes: ['major'], matchUpdateTypes: ['major'],
dependencyDashboardApproval: true, dependencyDashboardApproval: true
}, },
{ {
// Require Dependency Dashboard Approval for major version bumps of these Ruby packages // Require Dependency Dashboard Approval for major version bumps of these Ruby packages
matchManagers: ['bundler'], matchManagers: ['bundler'],
matchPackageNames: [ matchPackageNames: [
'rack', // Needs to be synced with Rails version 'rack',
'strong_migrations', // Requires manual upgrade 'strong_migrations',
'sidekiq', // Requires manual upgrade 'sidekiq',
'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version 'sidekiq-unique-jobs',
'redis', // Requires manual upgrade and sync with Sidekiq version 'redis'
], ],
matchUpdateTypes: ['major'], matchUpdateTypes: ['major'],
dependencyDashboardApproval: true, dependencyDashboardApproval: true
}, },
{ {
// Update GitHub Actions and Docker images weekly // Update GitHub Actions and Docker images weekly
matchManagers: ['github-actions', 'dockerfile', 'docker-compose'], matchManagers: ['github-actions', 'dockerfile', 'docker-compose'],
extends: ['schedule:weekly'], extends: ['schedule:weekly']
}, },
{ {
// Require Dependency Dashboard Approval for major & minor bumps for the ruby image, this needs to be synced with .ruby-version // Require Dependency Dashboard Approval for major & minor bumps for the ruby image, this needs to be synced with .ruby-version
matchManagers: ['dockerfile'], matchManagers: ['dockerfile'],
matchPackageNames: ['moritzheiber/ruby-jemalloc'], matchPackageNames: ['moritzheiber/ruby-jemalloc'],
matchUpdateTypes: ['minor', 'major'], matchUpdateTypes: ['minor', 'major'],
dependencyDashboardApproval: true, dependencyDashboardApproval: true
}, },
{ {
// Require Dependency Dashboard Approval for major bumps for the node image, this needs to be synced with .nvmrc // Require Dependency Dashboard Approval for major bumps for the node image, this needs to be synced with .nvmrc
matchManagers: ['dockerfile'], matchManagers: ['dockerfile'],
matchPackageNames: ['node'], matchPackageNames: ['node'],
matchUpdateTypes: ['major'], matchUpdateTypes: ['major'],
dependencyDashboardApproval: true, dependencyDashboardApproval: true
}, },
{ {
// Require Dependency Dashboard Approval for major postgres bumps in the docker-compose file, as those break dev environments // Require Dependency Dashboard Approval for major postgres bumps in the docker-compose file, as those break dev environments
matchManagers: ['docker-compose'], matchManagers: ['docker-compose'],
matchPackageNames: ['postgres'], matchPackageNames: ['postgres'],
matchUpdateTypes: ['major'], matchUpdateTypes: ['major'],
dependencyDashboardApproval: true, dependencyDashboardApproval: true
}, },
{ {
// Update devDependencies every week, with one grouped PR // Update devDependencies every week, with one grouped PR
@ -92,24 +84,24 @@
matchDepTypes: 'devDependencies', matchDepTypes: 'devDependencies',
matchUpdateTypes: ['patch', 'minor'], matchUpdateTypes: ['patch', 'minor'],
groupName: 'devDependencies (non-major)', groupName: 'devDependencies (non-major)',
extends: ['schedule:weekly'], extends: ['schedule:weekly']
}, },
{ {
// Group all eslint-related packages with `eslint` in the same PR // Group all eslint-related packages with `eslint` in the same PR
matchManagers: ['npm'], matchManagers: ['npm'],
matchPackageNames: ['eslint', 'eslint-*', '@typescript-eslint/*'], matchPackageNames: ['eslint', 'eslint-*', '@typescript-eslint/*'],
matchUpdateTypes: ['patch', 'minor'], matchUpdateTypes: ['patch', 'minor'],
groupName: 'eslint (non-major)', groupName: 'eslint (non-major)'
}, },
{ {
// Group actions/*-artifact in the same PR // Group actions/*-artifact in the same PR
matchManagers: ['github-actions'], matchManagers: ['github-actions'],
matchPackageNames: [ matchPackageNames: [
'actions/download-artifact', 'actions/download-artifact',
'actions/upload-artifact', 'actions/upload-artifact'
], ],
matchUpdateTypes: ['major'], matchUpdateTypes: ['major'],
groupName: 'artifact actions (major)', groupName: 'artifact actions (major)'
}, },
{ {
// Update @types/* packages every week, with one grouped PR // Update @types/* packages every week, with one grouped PR
@ -118,41 +110,41 @@
matchUpdateTypes: ['patch', 'minor'], matchUpdateTypes: ['patch', 'minor'],
groupName: 'DefinitelyTyped types (non-major)', groupName: 'DefinitelyTyped types (non-major)',
extends: ['schedule:weekly'], extends: ['schedule:weekly'],
addLabels: ['typescript'], addLabels: ['typescript']
}, },
{ {
// We want those packages to always have their own PR // We want those packages to always have their own PR
matchManagers: ['npm'], matchManagers: ['npm'],
matchPackageNames: [ matchPackageNames: [
'typescript', // Typescript has code-impacting changes in minor versions 'typescript'
], ],
groupName: null, // We dont want them to belong to any group groupName: null // We don't want them to belong to any group
}, },
{ {
// Group all RuboCop packages with `rubocop` in the same PR // Group all RuboCop packages with `rubocop` in the same PR
matchManagers: ['bundler'], matchManagers: ['bundler'],
matchPackageNames: ['rubocop', 'rubocop-*'], matchPackageNames: ['rubocop', 'rubocop-*'],
matchUpdateTypes: ['patch', 'minor'], matchUpdateTypes: ['patch', 'minor'],
groupName: 'RuboCop (non-major)', groupName: 'RuboCop (non-major)'
}, },
{ {
// Group all RSpec packages with `rspec` in the same PR // Group all RSpec packages with `rspec` in the same PR
matchManagers: ['bundler'], matchManagers: ['bundler'],
matchPackageNames: ['rspec', 'rspec-*'], matchPackageNames: ['rspec', 'rspec-*'],
matchUpdateTypes: ['patch', 'minor'], matchUpdateTypes: ['patch', 'minor'],
groupName: 'RSpec (non-major)', groupName: 'RSpec (non-major)'
}, },
{ {
// Group all opentelemetry-ruby packages in the same PR // Group all opentelemetry-ruby packages in the same PR
matchManagers: ['bundler'], matchManagers: ['bundler'],
matchPackageNames: ['opentelemetry-*'], matchPackageNames: ['opentelemetry-*'],
matchUpdateTypes: ['patch', 'minor'], matchUpdateTypes: ['patch', 'minor'],
groupName: 'opentelemetry-ruby (non-major)', groupName: 'opentelemetry-ruby (non-major)'
}, },
// Add labels depending on package manager // Add labels depending on package manager
{ matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] }, { matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] },
{ matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] }, { matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] },
{ matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] }, { matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] },
{ matchManagers: ['github-actions'], addLabels: ['github_actions'] }, { matchManagers: ['github-actions'], addLabels: ['github_actions'] }
], ]
} }