Skip to content

Commit

Permalink
Update git hook to allow
Browse files Browse the repository at this point in the history
 allows additional delimiter "-" between prefix and main part of the branch name.(mostly for the release branch naming)
  • Loading branch information
IvanChupin committed Jul 16, 2024
1 parent 60704bf commit a683db7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LC_ALL=C

local_branch="$(git rev-parse --abbrev-ref HEAD)"

valid_branch_regex="^(docs|feature|fix|test|release|improvement|hotfix|chore)\/[a-z0-9._-]+$"
valid_branch_regex="^(docs|feature|fix|test|release|improvement|hotfix|chore)[\/-][a-z0-9._-]+$"

message="There branch name is wrong. Branch names in this project must adhere to this contract: $valid_branch_regex. You should rename your branch to a valid name and try again."

Expand Down

0 comments on commit a683db7

Please sign in to comment.