Skip to content

Commit

Permalink
feat: add support for hotfix branches [DEVOP-224] (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
callms authored May 28, 2024
1 parent f195f12 commit 5237057
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/branch.js
Original file line number Diff line number Diff line change
@@ -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./_-]*)$/)
Expand Down
2 changes: 1 addition & 1 deletion lib/branch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ describe("branch", () => {
test.each([
"feat/foo",
"fix/foo",
"hotfix/foo",
"refactor/foo",
"docs/foo",
"chore/foo--bar",
Expand All @@ -24,7 +25,6 @@ describe("branch", () => {
"core/foo--bar--z",
"foo/foo-bar",
"feature/foo",
"hotfix/foo",
"core/foo",
"asset/foo",
"documentation/foo",
Expand Down

0 comments on commit 5237057

Please sign in to comment.