Merge branch 'chore/correct-branch-name-regex' into 'dev'

Correct branch hook regex

See merge request ics/sp/2025/n25b/pepperplus-ri!2
This commit was merged in pull request #2.
This commit is contained in:
2584433
2025-10-08 15:06:00 +00:00

View File

@@ -8,11 +8,11 @@ if echo "$branch" | grep -Eq "(dev|main)"; then
fi fi
# allowed pattern <type/> # allowed pattern <type/>
if echo "$branch" | grep -Eq "^(feat|fix|refactor|perf|style|test|docs|build|chore|revert)\/\w+-\w+-\w+"; then if echo "$branch" | grep -Eq "^(feat|fix|refactor|perf|style|test|docs|build|chore|revert)\/\w+(-\w+){0,5}$"; then
echo "✅ Branch name valid: $branch" echo "✅ Branch name valid: $branch"
exit 0 exit 0
else else
echo "❌ Invalid branch name: $branch" echo "❌ Invalid branch name: $branch"
echo "Branch must be named <type>/<description-of-branch> (must have 2 stipes - -)" echo "Branch must be named <type>/<description-of-branch> (must have one to six words separated by a dash)"
exit 1 exit 1
fi fi