renovate.json5 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. {
  2. $schema: 'https://docs.renovatebot.com/renovate-schema.json',
  3. extends: [
  4. 'config:recommended',
  5. 'customManagers:dockerfileVersions',
  6. ':labels(dependencies)',
  7. ':prConcurrentLimitNone', // Remove limit for open PRs at any time.
  8. ':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
  9. ],
  10. minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it
  11. // packageRules order is important, they are applied from top to bottom and are merged,
  12. // meaning the most important ones must be at the bottom, for example grouping rules
  13. // If we do not want a package to be grouped with others, we need to set its groupName
  14. // to `null` after any other rule set it to something.
  15. 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).',
  16. postUpdateOptions: ['yarnDedupeHighest'],
  17. packageRules: [
  18. {
  19. // Require Dependency Dashboard Approval for major version bumps of these node packages
  20. matchManagers: ['npm'],
  21. matchPackageNames: [
  22. 'tesseract.js', // Requires code changes
  23. 'react-hotkeys', // Requires code changes
  24. // Requires Webpacker upgrade or replacement
  25. '@svgr/webpack',
  26. '@types/webpack',
  27. 'babel-loader',
  28. 'compression-webpack-plugin',
  29. 'css-loader',
  30. 'imports-loader',
  31. 'mini-css-extract-plugin',
  32. 'postcss-loader',
  33. 'sass-loader',
  34. 'terser-webpack-plugin',
  35. 'webpack',
  36. 'webpack-assets-manifest',
  37. 'webpack-bundle-analyzer',
  38. 'webpack-dev-server',
  39. 'webpack-cli',
  40. // react-router: Requires manual upgrade
  41. 'history',
  42. 'react-router-dom',
  43. ],
  44. matchUpdateTypes: ['major'],
  45. dependencyDashboardApproval: true,
  46. },
  47. {
  48. // Require Dependency Dashboard Approval for major version bumps of these Ruby packages
  49. matchManagers: ['bundler'],
  50. matchPackageNames: [
  51. 'rack', // Needs to be synced with Rails version
  52. 'strong_migrations', // Requires manual upgrade
  53. 'sidekiq', // Requires manual upgrade
  54. 'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version
  55. 'redis', // Requires manual upgrade and sync with Sidekiq version
  56. ],
  57. matchUpdateTypes: ['major'],
  58. dependencyDashboardApproval: true,
  59. },
  60. {
  61. // Update GitHub Actions and Docker images weekly
  62. matchManagers: ['github-actions', 'dockerfile', 'docker-compose'],
  63. extends: ['schedule:weekly'],
  64. },
  65. {
  66. // Require Dependency Dashboard Approval for major & minor bumps for the ruby image, this needs to be synced with .ruby-version
  67. matchManagers: ['dockerfile'],
  68. matchPackageNames: ['moritzheiber/ruby-jemalloc'],
  69. matchUpdateTypes: ['minor', 'major'],
  70. dependencyDashboardApproval: true,
  71. },
  72. {
  73. // Require Dependency Dashboard Approval for major bumps for the node image, this needs to be synced with .nvmrc
  74. matchManagers: ['dockerfile'],
  75. matchPackageNames: ['node'],
  76. matchUpdateTypes: ['major'],
  77. dependencyDashboardApproval: true,
  78. },
  79. {
  80. // Require Dependency Dashboard Approval for major postgres bumps in the docker-compose file, as those break dev environments
  81. matchManagers: ['docker-compose'],
  82. matchPackageNames: ['postgres'],
  83. matchUpdateTypes: ['major'],
  84. dependencyDashboardApproval: true,
  85. },
  86. {
  87. // Update devDependencies every week, with one grouped PR
  88. matchDepTypes: 'devDependencies',
  89. matchUpdateTypes: ['patch', 'minor'],
  90. groupName: 'devDependencies (non-major)',
  91. extends: ['schedule:weekly'],
  92. },
  93. {
  94. // Group all eslint-related packages with `eslint` in the same PR
  95. matchManagers: ['npm'],
  96. matchPackageNames: ['eslint'],
  97. matchPackagePrefixes: ['eslint-', '@typescript-eslint/'],
  98. matchUpdateTypes: ['patch', 'minor'],
  99. groupName: 'eslint (non-major)',
  100. },
  101. {
  102. // Group actions/*-artifact in the same PR
  103. matchManagers: ['github-actions'],
  104. matchPackageNames: [
  105. 'actions/download-artifact',
  106. 'actions/upload-artifact',
  107. ],
  108. matchUpdateTypes: ['major'],
  109. groupName: 'artifact actions (major)',
  110. },
  111. {
  112. // Update @types/* packages every week, with one grouped PR
  113. matchPackagePrefixes: '@types/',
  114. matchUpdateTypes: ['patch', 'minor'],
  115. groupName: 'DefinitelyTyped types (non-major)',
  116. extends: ['schedule:weekly'],
  117. addLabels: ['typescript'],
  118. },
  119. {
  120. // We want those packages to always have their own PR
  121. matchManagers: ['npm'],
  122. matchPackageNames: [
  123. 'typescript', // Typescript has code-impacting changes in minor versions
  124. ],
  125. groupName: null, // We dont want them to belong to any group
  126. },
  127. {
  128. // Group all RuboCop packages with `rubocop` in the same PR
  129. matchManagers: ['bundler'],
  130. matchPackageNames: ['rubocop'],
  131. matchPackagePrefixes: ['rubocop-'],
  132. matchUpdateTypes: ['patch', 'minor'],
  133. groupName: 'RuboCop (non-major)',
  134. },
  135. {
  136. // Group all RSpec packages with `rspec` in the same PR
  137. matchManagers: ['bundler'],
  138. matchPackageNames: ['rspec'],
  139. matchPackagePrefixes: ['rspec-'],
  140. matchUpdateTypes: ['patch', 'minor'],
  141. groupName: 'RSpec (non-major)',
  142. },
  143. {
  144. // Group all opentelemetry-ruby packages in the same PR
  145. matchManagers: ['bundler'],
  146. matchPackagePrefixes: ['opentelemetry-'],
  147. matchUpdateTypes: ['patch', 'minor'],
  148. groupName: 'opentelemetry-ruby (non-major)',
  149. },
  150. // Add labels depending on package manager
  151. { matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] },
  152. { matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] },
  153. { matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] },
  154. { matchManagers: ['github-actions'], addLabels: ['github_actions'] },
  155. ],
  156. }