Skip to content

Commit

Permalink
Merge upstream/renovate/renovatebot-github-action-38.x
Browse files Browse the repository at this point in the history
  • Loading branch information
anomiex committed Jun 22, 2023
1 parent ea99289 commit 28336bc
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 81 deletions.
81 changes: 2 additions & 79 deletions .github/renovate-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ module.exports = {
platform: 'github',
repositories: [ 'Automattic/jetpack' ],

// We're including configuration in this file.
onboarding: false,
requireConfig: 'optional',

// Extra code to run before creating a commit.
allowPostUpgradeCommandTemplating: true,
allowedPostUpgradeCommands: [ monorepoBase + '.github/files/renovate-post-upgrade-run.sh' ],
Expand All @@ -53,15 +49,8 @@ module.exports = {
},
postUpdateOptions: [ 'pnpmDedupe' ],

// This is the renovate configuration.
extends: [ 'config:base', 'group:definitelyTyped' ],
labels: [ '[Type] Janitorial', '[Status] Needs Review' ],
prHourlyLimit: 1,
timezone: 'UTC',
schedule: [ 'before 3am on the first day of the month' ],
updateNotScheduled: false,
semanticCommits: 'disabled',
osvVulnerabilityAlerts: true,
// Most of the actual renovate configuration is in renovate.json5, except for a few things
// where we want to read part of it from somewhere else.
constraints: {
php: `~${ versions.PHP_VERSION }.0`,
},
Expand Down Expand Up @@ -95,71 +84,5 @@ module.exports = {
} )(),
enabled: false,
},

// We need to keep a wide version range to support PHP 5.6.
// Note for libraries used in plugins this will only work right for require-dev deps, not require.
{
matchPackageNames: [
'johnkary/phpunit-speedtrap',
'symfony/console',
'symfony/process',
'wikimedia/at-ease',
'wikimedia/testing-access-wrapper',
],
rangeStrategy: 'widen',
},

// Various other monorepos and package groupings.
{
extends: [ 'monorepo:wordpress' ],
separateMajorMinor: false,
prPriority: 1,
},
{
extends: [ 'monorepo:react' ],
},
{
extends: [ 'packages:eslint' ],
groupName: 'Eslint packages',
},
{
extends: [ 'packages:jsUnitTest' ],
groupName: 'JS unit testing packages',
},
{
groupName: 'Size-limit',
matchPackageNames: [ 'size-limit', '@size-limit/preset-app' ],
},
// These aren't a monorepo, but we may as well do them all together anyway.
{
groupName: 'GitHub API packages',
matchPackagePatterns: [ '^@actions/', '^@octokit/' ],
},

// 🤷
{
groupName: 'Instant Search Dependency Updates',
matchPackageNames: [
'cache',
'preact',
'progress-event',
'q-flat',
'qss',
'strip',
'uuid',
'@testing-library/preact',
],
reviewers: [ 'team:jetpack-search' ],
addLabels: [ 'Search', 'Instant Search' ],
},
],
lockFileMaintenance: {
enabled: true,
schedule: [ 'before 3:00 am on Monday on the 7th through 13th day of the month' ],
},
dependencyDashboard: true,
dependencyDashboardTitle: 'Renovate Dependency Updates',
dependencyDashboardLabels: [ 'Primary Issue', '[Type] Janitorial' ],
dependencyDashboardFooter:
'The bot runs every two hours, and may be monitored or triggered ahead of schedule [here](https://github.com/Automattic/jetpack/actions/workflows/renovate.yml).',
};
94 changes: 93 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
extends: [ 'config:base', 'group:definitelyTyped' ],
labels: [ '[Type] Janitorial', '[Status] Needs Review' ],
prHourlyLimit: 1,
timezone: 'UTC',
schedule: [ 'before 3am on the first day of the month' ],
updateNotScheduled: false,
semanticCommits: 'disabled',
osvVulnerabilityAlerts: true,
// Note: constraints.php is set in renovate-config.js where we can read it in code.

// Paths and files for renovate to ignore.
// We have to override this because the default from config:base catches projects/plugins/*/tests/e2e/package.json which we do want processed.
// We have to do it here rather than renovate-config.js because `extends` and `globalExtends` both somehow overwrite it when defined there, even with `ignorePresets`.
ignorePresets: [ ':ignoreModulesAndTests' ],
ignorePaths: [
'**/node_modules/**',
Expand All @@ -12,4 +21,87 @@
'**/tests/!(e2e)/**',
'**/__fixtures__/**',
],

packageRules: [
// Monorepo packages are excluded in renovate-config.js, where we can read
// the list of them in code.

// We need to keep a wide version range to support PHP 5.6.
// Note for libraries used in plugins this will only work right for require-dev deps, not require.
{
matchPackageNames: [
'johnkary/phpunit-speedtrap',
'symfony/console',
'symfony/process',
'wikimedia/at-ease',
'wikimedia/testing-access-wrapper',
],
rangeStrategy: 'widen',
},

// Various other monorepos and package groupings.
{
extends: [ 'monorepo:wordpress' ],
separateMajorMinor: false,
prPriority: 1,
},
{
extends: [ 'monorepo:react' ],
},
{
extends: [ 'packages:eslint' ],
groupName: 'Eslint packages',
},
{
extends: [ 'packages:jsUnitTest' ],
groupName: 'JS unit testing packages',
},
{
groupName: 'Size-limit',
matchPackageNames: [ 'size-limit', '@size-limit/preset-app' ],
},
// These aren't a monorepo, but we may as well do them all together anyway.
{
groupName: 'GitHub API packages',
matchPackagePatterns: [ '^@actions/', '^@octokit/' ],
},

// 🤷
{
groupName: 'Instant Search Dependency Updates',
matchPackageNames: [
'cache',
'preact',
'progress-event',
'q-flat',
'qss',
'strip',
'uuid',
'@testing-library/preact',
],
reviewers: [ 'team:jetpack-search' ],
addLabels: [ 'Search', 'Instant Search' ],
},
],

regexManagers: [
// Update the renovate-version in the action itself.
// See also https://github.com/renovatebot/github-action/issues/756
{
fileMatch: [ '^\\.github/workflows/renovate\\.yml$' ],
matchStrings: [ 'renovate-version: (?<currentValue>[^\\s]+)' ],
datasourceTemplate: 'docker',
depNameTemplate: 'renovate',
packageNameTemplate: 'ghcr.io/renovatebot/renovate',
},
],

lockFileMaintenance: {
enabled: true,
schedule: [ 'before 3:00 am on Monday on the 7th through 13th day of the month' ],
},
dependencyDashboard: true,
dependencyDashboardTitle: 'Renovate Dependency Updates',
dependencyDashboardLabels: [ 'Primary Issue', '[Type] Janitorial' ],
dependencyDashboardFooter: 'The bot runs every two hours, and may be monitored or triggered ahead of schedule [here](https://github.com/Automattic/jetpack/actions/workflows/renovate.yml).',
}
3 changes: 2 additions & 1 deletion .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
TOKEN: ${{ secrets.RENOVATE_TOKEN }}
run: |
curl --no-progress-meter --header "Authorization: Bearer $TOKEN" https://api.github.com/rate_limit
- uses: renovatebot/github-action@v34.154.2
- uses: renovatebot/github-action@v38.1.7
with:
configurationFile: /tmp/monorepo/.github/renovate-config.js
token: ${{ secrets.RENOVATE_TOKEN }}
renovate-version: 35.140.0
env:
LOG_LEVEL: ${{ github.event.inputs.logLevel || 'debug' }}
RENOVATE_DRY_RUN: ${{ github.event.inputs.dryRun == 'no' && 'null' || github.event.inputs.dryRun || 'null' }}
Expand Down

0 comments on commit 28336bc

Please sign in to comment.