From e64fde1840b02d1dfa82fdbb2ec0d62d68740688 Mon Sep 17 00:00:00 2001 From: setunapo Date: Thu, 18 Aug 2022 15:28:13 +0800 Subject: [PATCH] ci: allow merge pull request --- .github/commitlint.config.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/commitlint.config.js b/.github/commitlint.config.js index c977122749..98012d28b0 100644 --- a/.github/commitlint.config.js +++ b/.github/commitlint.config.js @@ -1,6 +1,12 @@ const validateTypeNums = (parsedCommit) => { + const mergePrefix = "Merge pull request" + if (parsedCommit.raw.startsWith(mergePrefix)) { + console.log('this is a merge commit:' + parsedCommit.raw) + return [true,''] + } + if (!parsedCommit.type) { - return [false, 'invalid commit message'] + return [false, 'invalid commit message, should be like "name: descriptions.", yours: "' + parsedCommit.raw + '"'] } const types = parsedCommit.type.split(' ') @@ -9,8 +15,7 @@ const validateTypeNums = (parsedCommit) => { return [false, 'R4R or WIP is not acceptable, no matter upper case or lower case'] } } - - return [true,''] + return [true,''] }