Skip to content

Commit

Permalink
abcd Merge pull request test
Browse files Browse the repository at this point in the history
  • Loading branch information
setunapo committed Aug 18, 2022
1 parent 11d2bae commit 28b43aa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .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(' ')
Expand All @@ -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,'']
}


Expand Down

0 comments on commit 28b43aa

Please sign in to comment.