diff --git a/hooks/pre-recieve.sh b/hooks/pre-recieve.sh index 26b15ce..728155f 100644 --- a/hooks/pre-recieve.sh +++ b/hooks/pre-recieve.sh @@ -1,9 +1,8 @@ #!/bin/bash -# Semantic commit pattern: -# feat|fix|docs|style|refactor|test|perf|build|ci|chore|revert(optional scope): message -# Allow dots (.), uppercase letters, and other common filename characters in scope -PATTERN='^(feat|fix|docs|style|refactor|test|perf|build|ci|chore|revert)(\([a-zA-Z0-9\-\.\_]+\))?: .{1,}$' +# Semantic commit pattern - fixed to properly handle hyphens in scope +# Moved the hyphen to the end of the character class to avoid interpretation issues +PATTERN='^(feat|fix|docs|style|refactor|test|perf|build|ci|chore|revert)(\([a-zA-Z0-9\._-]+\))?: .{1,}$' # Pattern for merge commits from pull requests - simplified to catch all formats PR_MERGE_PATTERN='^Merge pull request'