6130-commitLint #1792
|
@ -13,7 +13,7 @@ function getCurrentBranchName(p = process.cwd()) {
|
||||||
return headContent.trim().split('/')[2];
|
return headContent.trim().split('/')[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
const branchName = '12peterParkersl';
|
const branchName = getCurrentBranchName();
|
||||||
|
|
||||||
if (branchName) {
|
if (branchName) {
|
||||||
const msgPath = `.git/COMMIT_EDITMSG`;
|
const msgPath = `.git/COMMIT_EDITMSG`;
|
||||||
|
@ -21,8 +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) {
|
||||||
console.log('reference: ', reference);
|
|
||||||
|
|
||||||
const splitedMsg = msg.split(':');
|
const splitedMsg = msg.split(':');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue