From af1ae038f56d47b14616a3b9f68d177d6fcf66fe Mon Sep 17 00:00:00 2001 From: Mathis Pinsault Date: Thu, 7 Aug 2025 10:00:35 +0200 Subject: [PATCH 1/2] feat(branch-name): allow crowdin branch name --- lib/branch.js | 15 ++++++++------- lib/branch.test.js | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/branch.js b/lib/branch.js index 2d95a9456..21f8bb5ab 100644 --- a/lib/branch.js +++ b/lib/branch.js @@ -1,13 +1,14 @@ function isBranchNameValid(branchName) { return ( - !!branchName.match( - /^(hotfix|feat|fix|chore|docs|refactor|test|revert|ci|perf|style|build|change|remove|poc|mobsuccessbot|dependabot)\/([a-z][a-z0-9._-]*)$/ + /^(hotfix|feat|fix|chore|docs|refactor|test|revert|ci|perf|style|build|change|remove|poc|mobsuccessbot|dependabot)\/([a-z][a-z0-9._-]*)$/.test( + 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(/^(renovate)\/([a-z0-9_\-@./_-]*)$/) || - !!branchName.match(/^(copilot)\/([a-z0-9_\-@./_-]*)$/) + /^revert-([0-9]+)-([a-z0-9_\-@./_-]*)$/.test(branchName) || + /^(mobsuccessbot)\/([a-z0-9_\-@./_-]*)$/.test(branchName) || + /^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/.test(branchName) || + /^(renovate)\/([a-z0-9_\-@./_-]*)$/.test(branchName) || + /^(copilot)\/([a-z0-9_\-@./_-]*)$/.test(branchName) || + /^crowdin\/update-translations$/.test(branchName) ); } diff --git a/lib/branch.test.js b/lib/branch.test.js index e3d2e7111..19b35e914 100644 --- a/lib/branch.test.js +++ b/lib/branch.test.js @@ -20,6 +20,7 @@ describe("branch", () => { "renovate/configure", "renovate/tanstack-table-monorepo", "renovate/mobsuccess-devops-dlpo-react-client-1.x", + "crowdin/update-translations", ])("Test branch %s should be valid", (branch) => { expect(isBranchNameValid(branch)).toBe(true); }); @@ -42,6 +43,7 @@ describe("branch", () => { "rework/fooDriveFooterBar", "chore//foo", "revert-change/brevo-emailing", + "crowdin/not-update-translations", ])("Test branch %s should be invalid", (branch) => { expect(isBranchNameValid(branch)).toBe(false); }); From 94b26840e1bb8d768cdeadfd99d5f062a8f240ef Mon Sep 17 00:00:00 2001 From: Mathis Pinsault Date: Thu, 7 Aug 2025 10:30:59 +0200 Subject: [PATCH 2/2] empty commit to force workflows restart