Skip to content

Commit c7e9608

Browse files
committed
fix(ci): trim whitespace and ignore all merge commits in commit check
1 parent 1d6c7be commit c7e9608

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/commit-message.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
INVALID=false
3131
3232
for COMMIT in $COMMITS; do
33-
MESSAGE=$(git log -1 --pretty=format:"%s" $COMMIT)
33+
MESSAGE=$(git log -1 --pretty=format:"%s" $COMMIT | sed 's/^[[:space:]]*//')
3434
3535
# Ignorer les commits de merge
36-
if [[ "$MESSAGE" =~ ^Merge\ ]]; then
36+
if [[ "$MESSAGE" =~ ^Merge\ (pull\ request|branch|remote) ]]; then
3737
echo "⏭️ Commit de merge ignoré: $MESSAGE"
3838
continue
3939
fi

0 commit comments

Comments
 (0)