Skip to content

Commit

Permalink
chore: allow branch name master in pre commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Willenbring committed Jul 21, 2023
1 parent 61dbcb8 commit 9df1d5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

validate_branch_name() {
local branch=$(git rev-parse --abbrev-ref HEAD)
local regex="^(feature|fix|hotfix|release|refactor|perf|tech|docs|dependabot)\/[a-zA-Z0-9_]+(\/[a-zA-Z0-9_]+)*$"
local regex="^master|(feature|fix|hotfix|release|refactor|perf|tech|docs|dependabot)\/[a-zA-Z0-9_]+(\/[a-zA-Z0-9_]+)*$"
if ! [[ $branch =~ $regex ]]; then
echo "Your commit was rejected due to branching name"
echo "Please rename your branch with '(feature|fix|hotfix|release|refactor|perf|tech|docs)/test_123' syntax"
Expand Down

0 comments on commit 9df1d5e

Please sign in to comment.