From 28b43aa7bac9a92bceb8b112e8dbe61253429bec Mon Sep 17 00:00:00 2001 From: setunapo Date: Thu, 18 Aug 2022 15:28:13 +0800 Subject: [PATCH] abcd Merge pull request test --- .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..f03166fba8 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,''] }