commit-message-validator
Advanced tools
Comparing version 0.1.11 to 1.0.0
@@ -19,7 +19,17 @@ #!/usr/bin/env node | ||
let message = fs.readFileSync(commitMsgFile, 'utf8') | ||
message = message.split('\n')[0] | ||
const tmpArr = message.split('\n') | ||
let filtered = [] | ||
for (const line of tmpArr) { | ||
// break at first comment line | ||
if (/^# /.test(line)) { | ||
break | ||
} | ||
filtered.push(line) | ||
} | ||
message = filtered.join('\n') | ||
validator(message) | ||
} catch (error) { | ||
console.log('Error read COMMIT_EDITMSG file') | ||
console.error(error) | ||
process.exit(1) | ||
} |
{ | ||
"name": "commit-message-validator", | ||
"version": "0.1.11", | ||
"version": "1.0.0", | ||
"description": "Git commit-msg hook validator", | ||
@@ -14,3 +14,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/jinjutech/commit-message-validator.git" | ||
"url": "git+https://github.com/banyudu/commit-message-validator.git" | ||
}, | ||
@@ -25,5 +25,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/jinjutech/commit-message-validator/issues" | ||
"url": "https://github.com/banyudu/commit-message-validator/issues" | ||
}, | ||
"homepage": "https://github.com/jinjutech/commit-message-validator#readme", | ||
"homepage": "https://github.com/banyudu/commit-message-validator#readme", | ||
"bin": { | ||
@@ -30,0 +30,0 @@ "commit-message-validator": "./lib/cli.js" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6413
91
1