diff --git a/.github/workflows/validate-commits.yml b/.github/workflows/validate-commits.yml index 7b0edbe..29679a1 100644 --- a/.github/workflows/validate-commits.yml +++ b/.github/workflows/validate-commits.yml @@ -21,7 +21,9 @@ jobs: # Conventional commits regex pattern # Matches: type[(scope)][!]: description # Where type is one of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert - PATTERN='^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .{1,}' + # Scope (optional) can contain: lowercase letters, numbers, hyphens, underscores, forward slashes + # Description must start with a lowercase letter + PATTERN='^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9/_-]+\))?!?: [a-z].+' if [[ ! "$PR_TITLE" =~ $PATTERN ]]; then echo "================================================"