Compare commits
1 commit
4be9726e8b
...
ba9b69350e
Author | SHA1 | Date | |
---|---|---|---|
|
ba9b69350e |
|
@ -28,6 +28,17 @@ jobs:
|
||||||
fi
|
fi
|
||||||
echo "Subject start check passed."
|
echo "Subject start check passed."
|
||||||
|
|
||||||
|
- name: Check Commit Message Type and Format
|
||||||
|
run: |
|
||||||
|
echo "Checking commit message type and format..."
|
||||||
|
commit_message=$(git log -1 --pretty=%B)
|
||||||
|
if ! echo "$commit_message" | grep -Eq "^(feat|fix|chore|docs|style|refactor|test|perf):"; then
|
||||||
|
echo "Error: Commit message does not follow the required format: <type>: <subject>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Commit message type and format check passed."
|
||||||
|
|
||||||
|
- name: Check Subject Length
|
||||||
run: |
|
run: |
|
||||||
echo "Checking subject length..."
|
echo "Checking subject length..."
|
||||||
commit_subject=$(git log -1 --pretty=%B | head -n 1)
|
commit_subject=$(git log -1 --pretty=%B | head -n 1)
|
||||||
|
|
Loading…
Reference in a new issue