Skip to content

Commit f74da0a

Browse files
authored
[#0] enhance check-commit-convention.yml to avoid merge commit
1 parent d1a76d1 commit f74da0a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/check-commit-convention.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- name: Checkout code with full history
1010
uses: actions/checkout@v4
1111
with:
12-
fetch-depth: 0 # 전체 Git 히스토리를 가져옴 (PR 비교 가능)
12+
fetch-depth: 0 # 전체 Git 히스토리를 가져옴
1313

1414
- name: Get base branch
1515
run: echo "BASE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
@@ -28,6 +28,13 @@ jobs:
2828
invalid_commits=0
2929
echo "🔍 Checking commit message convention..."
3030
while IFS= read -r commit_message; do
31+
# "Merge"로 시작하는 메시지는 검사에서 제외
32+
if [[ "$commit_message" =~ ^Merge ]]; then
33+
echo "⚡ Skipping merge commit: $commit_message"
34+
continue
35+
fi
36+
37+
# Commit message validation
3138
if [[ ! "$commit_message" =~ ^(feat|fix|docs|style|refactor|test|chore)(\(.+\))?!?:\ .+ ]]; then
3239
echo "❌ Invalid commit message: $commit_message"
3340
invalid_commits=$((invalid_commits + 1))

0 commit comments

Comments
 (0)