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",