From dd04706ef51fb628e0f2d7156cfd99f381bc77c9 Mon Sep 17 00:00:00 2001 From: Justin Glommen Date: Tue, 12 Sep 2023 12:05:47 -0500 Subject: [PATCH 1/4] fix(infra): Separate clickup-projen into different packageRule [bugfix] --- renovate.json5 | 12 ++++++++++-- src/renovate-workflow.ts | 12 ++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index bc6ab85e..aaf7f6f2 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -13,12 +13,21 @@ "github>whitesource/merge-confidence:beta" ], "packageRules": [ + { + "matchPackagePatterns": [ + "^@time-loop\\/clickup-projen" + ], + "allowedVersions": "!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/" + }, { "groupName": "all non-major dependencies", "groupSlug": "all-minor-patch", "matchPackagePatterns": [ "*" ], + "excludePackagePatterns": [ + "^@time-loop\\/clickup-projen" + ], "matchUpdateTypes": [ "minor", "patch" @@ -26,8 +35,7 @@ "automerge": true, "addLabels": [ "auto-approve" - ], - "allowedVersions": "!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/" + ] }, { "matchDepTypes": [ diff --git a/src/renovate-workflow.ts b/src/renovate-workflow.ts index bfd96ea8..0c085181 100644 --- a/src/renovate-workflow.ts +++ b/src/renovate-workflow.ts @@ -114,20 +114,24 @@ export module renovateWorkflow { 'github>whitesource/merge-confidence:beta', ], packageRules: [ + { + matchPackagePatterns: ['^@time-loop\\/clickup-projen'], + // Bypass prerelease versions: + // https://docs.renovatebot.com/configuration-options/#allowedversions + // Ex: 1.1.1 is allowed, 1.1.1-beta.0 is not allowed. + allowedVersions: '!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/', + }, { // copied from this preset: https://docs.renovatebot.com/presets-group/#groupallnonmajor groupName: 'all non-major dependencies', groupSlug: 'all-minor-patch', matchPackagePatterns: ['*'], + excludePackagePatterns: ['^@time-loop\\/clickup-projen'], matchUpdateTypes: ['minor', 'patch'], // Tell renovate to enable github's auto merge feature on the PR automerge: options.autoMergeNonBreakingUpdates ? true : undefined, // Adding the auto-approve label will make projens auto approve workflow approve the PR so it will be auto merged addLabels: [options.autoMergeNonBreakingUpdates ? AUTO_APPROVE_PR_LABEL : undefined], - // Bypass prerelease versions: - // https://docs.renovatebot.com/configuration-options/#allowedversions - // Ex: 1.1.1 is allowed, 1.1.1-beta.0 is not allowed. - allowedVersions: '!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/', }, { matchDepTypes: ['optionalDependencies'], From aea281357c26ec93f87cdd43e89ca1e4c5c11153 Mon Sep 17 00:00:00 2001 From: Justin Glommen Date: Tue, 12 Sep 2023 12:10:30 -0500 Subject: [PATCH 2/4] chore(infra): Rearrange packages to not impact tests [bugfix] --- src/renovate-workflow.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/renovate-workflow.ts b/src/renovate-workflow.ts index 0c085181..f5a8f27c 100644 --- a/src/renovate-workflow.ts +++ b/src/renovate-workflow.ts @@ -114,13 +114,6 @@ export module renovateWorkflow { 'github>whitesource/merge-confidence:beta', ], packageRules: [ - { - matchPackagePatterns: ['^@time-loop\\/clickup-projen'], - // Bypass prerelease versions: - // https://docs.renovatebot.com/configuration-options/#allowedversions - // Ex: 1.1.1 is allowed, 1.1.1-beta.0 is not allowed. - allowedVersions: '!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/', - }, { // copied from this preset: https://docs.renovatebot.com/presets-group/#groupallnonmajor groupName: 'all non-major dependencies', @@ -137,6 +130,13 @@ export module renovateWorkflow { matchDepTypes: ['optionalDependencies'], addLabels: [OPTIONAL_RENOVATE_PR_LABEL], }, + { + matchPackagePatterns: ['^@time-loop\\/clickup-projen'], + // Bypass prerelease versions: + // https://docs.renovatebot.com/configuration-options/#allowedversions + // Ex: 1.1.1 is allowed, 1.1.1-beta.0 is not allowed. + allowedVersions: '!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/', + }, ], /* override defaults set in config:base preset */ From f55ea8d8f12b95af997f209b07bc343dbb6326db Mon Sep 17 00:00:00 2001 From: Justin Glommen Date: Tue, 12 Sep 2023 12:10:36 -0500 Subject: [PATCH 3/4] chore(infra): Update snapshot UT [bugfix] --- test/__snapshots__/renovate-workflow.test.ts.snap | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/__snapshots__/renovate-workflow.test.ts.snap b/test/__snapshots__/renovate-workflow.test.ts.snap index a9cbde33..b2e8bf7e 100644 --- a/test/__snapshots__/renovate-workflow.test.ts.snap +++ b/test/__snapshots__/renovate-workflow.test.ts.snap @@ -114,8 +114,10 @@ exports[`getRenovateOptions defaults 1`] = ` "addLabels": [ undefined, ], - "allowedVersions": "!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/", "automerge": undefined, + "excludePackagePatterns": [ + "^@time-loop\\/clickup-projen", + ], "groupName": "all non-major dependencies", "groupSlug": "all-minor-patch", "matchPackagePatterns": [ @@ -134,6 +136,12 @@ exports[`getRenovateOptions defaults 1`] = ` "optionalDependencies", ], }, + { + "allowedVersions": "!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/", + "matchPackagePatterns": [ + "^@time-loop\\/clickup-projen", + ], + }, ], "platformAutomerge": true, "prConcurrentLimit": 0, From eb82f5b9ca429fd469ea188fd91276584390461d Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 12 Sep 2023 17:12:26 +0000 Subject: [PATCH 4/4] chore: self mutation Signed-off-by: github-actions --- renovate.json5 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index aaf7f6f2..521bc059 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -13,12 +13,6 @@ "github>whitesource/merge-confidence:beta" ], "packageRules": [ - { - "matchPackagePatterns": [ - "^@time-loop\\/clickup-projen" - ], - "allowedVersions": "!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/" - }, { "groupName": "all non-major dependencies", "groupSlug": "all-minor-patch", @@ -44,6 +38,12 @@ "addLabels": [ "optional" ] + }, + { + "matchPackagePatterns": [ + "^@time-loop\\/clickup-projen" + ], + "allowedVersions": "!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/" } ], "ignoreDeps": [