@fatso83/check-commit-msg
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -23,3 +23,3 @@ /* eslint-disable no-console */ | ||
if (!commitMsg.match(/^[a-zA-Z]{2,4}-\d{1,5} /)) { | ||
if (!commitMsg.match(/^[a-zA-Z]{2,6}-\d{1,5} /)) { | ||
errors.push( | ||
@@ -26,0 +26,0 @@ 'Commit messages should be prefixed with the github issue number, i.e. "GH-637 Update design of ListView"' |
/* eslint-disable no-console */ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const rebasePath = path.join(__dirname, '..', '.git/rebase-merge'); | ||
const mergePath = path.join(__dirname, '..', '.git/MERGE_HEAD'); | ||
const cp = require('child_process'); | ||
const rootDir = cp.execSync('git rev-parse --show-toplevel').toString().trim(); | ||
const rebasePath = path.join(rootDir, '.git/rebase-merge'); | ||
const mergePath = path.join(rootDir, '.git/MERGE_HEAD'); | ||
const isInMergeOrRebase = () => fs.existsSync(rebasePath) || fs.existsSync(mergePath); | ||
@@ -7,0 +10,0 @@ |
{ | ||
"name": "@fatso83/check-commit-msg", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"bin": "./cli.js", | ||
@@ -5,0 +5,0 @@ "description": "Check if your commit message follows Chris Beam's \"Seven rules of a good commit message\"", |
@@ -22,5 +22,6 @@ # @fatso83/check-commit-msg | ||
npm install -g @fatso83/check-commit-msg | ||
echo > .git/hooks/commit-msg << EOF | ||
echo << 'EOF' > .git/hooks/commit-msg | ||
check-commit-msg $1 | ||
EOF | ||
chmod +x .git/hooks/commit-msg #make it executable | ||
``` | ||
@@ -27,0 +28,0 @@ |
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
6080
102
40
1