浏览代码

feat(changelog): ignore merge commits

Marc Cornellà 3 年之前
父节点
当前提交
0e7d7b87f3
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      tools/changelog.sh

+ 5 - 0
tools/changelog.sh

@@ -114,6 +114,11 @@ function parse-commit {
     fi
   }
 
+  # Ignore commit if it is a merge commit
+  if [[ $(command git show -s --format=%p $1 | wc -w) -gt 1 ]]; then
+    return
+  fi
+
   # Parse commit with hash $1
   local hash="$1" subject body warning rhash
   subject="$(command git show -s --format=%s $hash)"