File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed
Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 4646 doesn't start with an uppercase character.
4747 wip : true
4848 validateSingleCommit : false
49-
50- - name : Validate individual commit messages
51- run : |
52- # Get all commits in this PR
53- git log --format="%H %s" origin/${{ github.base_ref }}..HEAD > commits.txt
54-
55- # Check each commit message
56- while IFS= read -r line; do
57- commit_hash=$(echo "$line" | cut -d' ' -f1)
58- commit_msg=$(echo "$line" | cut -d' ' -f2-)
59-
60- echo "Checking commit: $commit_hash"
61- echo "Message: $commit_msg"
62-
63- # Validate conventional commit format
64- if ! echo "$commit_msg" | grep -E '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\(.+\))?: .+$'; then
65- echo "❌ Commit $commit_hash does not follow conventional commits format:"
66- echo " Message: $commit_msg"
67- echo " Expected: type(scope): description"
68- echo " Example: feat(auth): add user login functionality"
69- exit 1
70- fi
71-
72- echo "✅ Commit $commit_hash follows conventional commits"
73- done < commits.txt
74-
75- echo "🎉 All commits follow conventional commits format!"
You can’t perform that action at this time.
0 commit comments