From 5237057c298349e810fbf8096d67d75d4604185f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20All=C3=A8ne?= <66381046+callms@users.noreply.github.com> Date: Tue, 28 May 2024 15:44:04 +0200 Subject: [PATCH] feat: add support for hotfix branches [DEVOP-224] (#94) --- lib/branch.js | 2 +- lib/branch.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/branch.js b/lib/branch.js index 63bc100e..f1e21b81 100644 --- a/lib/branch.js +++ b/lib/branch.js @@ -1,7 +1,7 @@ function isBranchNameValid(branchName) { return ( !!branchName.match( - /^(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._-]*)$/ ) || !!branchName.match(/^(mobsuccessbot)\/([a-z0-9_\-@./_-]*)$/) || !!branchName.match(/^(dependabot)\/([a-z][a-zA-Z0-9./_-]*)$/) diff --git a/lib/branch.test.js b/lib/branch.test.js index 1721554b..55381b80 100644 --- a/lib/branch.test.js +++ b/lib/branch.test.js @@ -4,6 +4,7 @@ describe("branch", () => { test.each([ "feat/foo", "fix/foo", + "hotfix/foo", "refactor/foo", "docs/foo", "chore/foo--bar", @@ -24,7 +25,6 @@ describe("branch", () => { "core/foo--bar--z", "foo/foo-bar", "feature/foo", - "hotfix/foo", "core/foo", "asset/foo", "documentation/foo",