Score
0
Watch 8 Star 31 Fork 10

百度开源 / swan-jsJavaScript

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
百度智能小程序核心框架 spread retract

Clone or download
commit-msg 726 Bytes
Copy Edit Web IDE Raw Blame History
#!/usr/bin/env node
var fs = require('fs');
var commitMsgFile = process.argv[2];
var commitMsg = fs.readFileSync(commitMsgFile).toString();
var ruleReg = /\u3010\S*?\u3011[^\u3010]*\n/g;
if (commitMsg.indexOf('[ignore]') === 0 || commitMsg.indexOf('[autopublish]') === 0) {
process.exit();
}
else if (!commitMsg.match(ruleReg)) {
console.log('You may have used git commit -m, please use git commit and hit enter.');
process.exit(1);
}
else if (commitMsg.match(ruleReg).length >= 4) {
process.exit();
}
else {
console.log('Submission does not meet the requirements, please submit in the following format:\n【上线功能】\n【功能分类】\n【changelog】\n【测试人员】');
process.exit(1);
}

Comment ( 0 )

Sign in for post a comment

JavaScript
1
https://gitee.com/baidu/swan-js.git
git@gitee.com:baidu/swan-js.git
baidu
swan-js
swan-js
master

Search