From 185a0029d35842dfae10b1a22cbb577f26f1a322 Mon Sep 17 00:00:00 2001 From: Colin Lienard Date: Wed, 13 Nov 2024 10:30:18 +0100 Subject: [PATCH] feat(branch): allow renovate prefix [FRONT-1897] (#102) --- lib/branch.js | 3 ++- lib/branch.test.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/branch.js b/lib/branch.js index da74db2d..03e599a9 100644 --- a/lib/branch.js +++ b/lib/branch.js @@ -5,7 +5,8 @@ function isBranchNameValid(branchName) { ) || !!branchName.match(/^revert-([0-9]+)-([a-z0-9_\-@./_-]*)$/) || !!branchName.match(/^(mobsuccessbot)\/([a-z0-9_\-@./_-]*)$/) || - !!branchName.match(/^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/) + !!branchName.match(/^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/) || + !!branchName.match(/^(renovate)\/([a-z0-9_\-@./_-]*)$/) ); } diff --git a/lib/branch.test.js b/lib/branch.test.js index 9c15feb8..e3d2e711 100644 --- a/lib/branch.test.js +++ b/lib/branch.test.js @@ -17,6 +17,9 @@ describe("branch", () => { "dependabot/foo", "dependabot/npm_and_yarn/axios-0.21.1", "dependabot/npm_and_yarn/axios-0.21.1", + "renovate/configure", + "renovate/tanstack-table-monorepo", + "renovate/mobsuccess-devops-dlpo-react-client-1.x", ])("Test branch %s should be valid", (branch) => { expect(isBranchNameValid(branch)).toBe(true); });