Skip to content

Commit de2b957

Browse files
jorbenclaude
andcommitted
ci: 🐛 exclude merge commits from commit message validation
Add --no-merges flag to git log to skip auto-generated merge commits from GitHub that don't follow conventional commit format. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 44b6566 commit de2b957

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ jobs:
2020
- name: Validate commit message
2121
run: |
2222
# Get commit message(s) to validate
23+
# Use --no-merges to exclude merge commits (auto-generated by GitHub)
2324
if [ "${{ github.event_name }}" = "pull_request" ]; then
24-
COMMITS=$(git log --format=%s origin/${{ github.base_ref }}..HEAD)
25+
COMMITS=$(git log --no-merges --format=%s origin/${{ github.base_ref }}..HEAD)
2526
else
2627
COMMITS=$(git log -1 --format=%s)
2728
fi

0 commit comments

Comments
 (0)