mirror of
https://github.com/maigamo/Daily-Task-Auto-Generator.git
synced 2026-07-22 05:48:30 +00:00
Update main.yml
This commit is contained in:
parent
8bd5291a93
commit
66d7249f33
1 changed files with 0 additions and 16 deletions
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
|
|
@ -61,19 +61,3 @@ jobs:
|
|||
echo "❌ manifest.json not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 仅在 push 事件时校验提交信息格式,跳过合并提交
|
||||
- name: Enforce commit message format (push only)
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
COMMIT_MSG=$(git log -1 --pretty=%B)
|
||||
echo "Last commit: $COMMIT_MSG"
|
||||
if echo "$COMMIT_MSG" | grep -q 'Merge branch'; then
|
||||
echo "Merge commit detected, skipping commit message format check."
|
||||
exit 0
|
||||
fi
|
||||
if ! echo "$COMMIT_MSG" | grep -E -q '^(feat|fix|chore|docs|style|refactor|test)(\(.+\))?:\s*.+'
|
||||
then
|
||||
echo "❌ Commit message does not follow conventional format (e.g., 'feat: xxx')"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue