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