forked from natuka/web.puabadge.com
Initial commit
This commit is contained in:
commit
84061c9a18
243 files changed
+63148
No files matched your search
@@ -0,0 +1,14 @@
|
||||
const msg = require('fs').readFileSync('.git/COMMIT_EDITMSG', 'utf-8').trim()
|
||||
const commitRE = /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip|release)(\(.+\))?: .{1,50}/
|
||||
const mergeRe = /^(Merge pull request|Merge branch)/
|
||||
|
||||
if (!commitRE.test(msg)) {
|
||||
console.log('msg: ' + msg)
|
||||
if (!mergeRe.test(msg)) {
|
||||
console.log('git commit unpass')
|
||||
console.error('git commit error, needs title(scope): desc')
|
||||
process.exit(1)
|
||||
}
|
||||
} else {
|
||||
console.log('git commit pass')
|
||||
}
|
||||
Reference in new issue
Block a user