diff --git a/renovate.json5 b/renovate.json5 index 321db426..bc6ab85e 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -26,7 +26,8 @@ "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 e7d0b9ef..bfd96ea8 100644 --- a/src/renovate-workflow.ts +++ b/src/renovate-workflow.ts @@ -124,6 +124,10 @@ export module renovateWorkflow { 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'], diff --git a/test/__snapshots__/renovate-workflow.test.ts.snap b/test/__snapshots__/renovate-workflow.test.ts.snap index 5b61574e..a9cbde33 100644 --- a/test/__snapshots__/renovate-workflow.test.ts.snap +++ b/test/__snapshots__/renovate-workflow.test.ts.snap @@ -114,6 +114,7 @@ exports[`getRenovateOptions defaults 1`] = ` "addLabels": [ undefined, ], + "allowedVersions": "!/^[0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?-(alpha|beta).*$/", "automerge": undefined, "groupName": "all non-major dependencies", "groupSlug": "all-minor-patch",