test: refs #null commit #2297
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
function getCurrentBranchName(p = process.cwd()) {
|
function getCurrentBranchName(p = process.cwd()) {
|
||||||
if (!fs.existsSync(p)) return false;
|
if (!fs.existsSync(p)) return false;
|
||||||
|
@ -21,7 +21,7 @@ if (branchName) {
|
||||||
const reference = branchName.match(/^\d+/);
|
const reference = branchName.match(/^\d+/);
|
||||||
|
|
||||||
const referenceTag = `refs #${reference}`;
|
const referenceTag = `refs #${reference}`;
|
||||||
if (!msg.includes(referenceTag) || reference) {
|
if (!msg.includes(referenceTag) && reference) {
|
||||||
const splitedMsg = msg.split(':');
|
const splitedMsg = msg.split(':');
|
||||||
|
|
||||||
if (splitedMsg.length > 1) {
|
if (splitedMsg.length > 1) {
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
echo "Running husky commit-msg hook"
|
echo "Running husky commit-msg hook"
|
||||||
npx --no-install commitlint --edit
|
npx --no-install commitlint --edit
|
||||||
echo "Adding reference tag to commit message"
|
echo "Adding reference tag to commit message"
|
||||||
npm run addReferenceTag
|
node .husky/addReferenceTag.js
|
||||||
|
|
||||||
|
|
|
@ -113,10 +113,7 @@
|
||||||
"test:e2e": "node e2e/tests.js",
|
"test:e2e": "node e2e/tests.js",
|
||||||
"test:front": "jest --watch",
|
"test:front": "jest --watch",
|
||||||
"back": "nodemon --inspect -w modules ./node_modules/gulp/bin/gulp.js back",
|
"back": "nodemon --inspect -w modules ./node_modules/gulp/bin/gulp.js back",
|
||||||
"lint": "eslint ./ --cache --ignore-pattern .gitignore",
|
"lint": "eslint ./ --cache --ignore-pattern .gitignore"
|
||||||
"commitlint": "commitlint --edit",
|
|
||||||
"prepare": "husky install",
|
|
||||||
"addReferenceTag": "node .husky/addReferenceTag.js"
|
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"projects": [
|
"projects": [
|
||||||
|
|
Loading…
Reference in New Issue