feat: refs #6130 handle branch without task

This commit is contained in:
Pablo Natek 2024-04-12 12:20:18 +02:00
parent fa1e679b48
commit 0db4cd7a12
1 changed files with 2 additions and 3 deletions

View File

@ -13,7 +13,7 @@ function getCurrentBranchName(p = process.cwd()) {
return headContent.trim().split('/')[2];
}
const branchName = '12peterParkersl';
const branchName = getCurrentBranchName();
if (branchName) {
const msgPath = `.git/COMMIT_EDITMSG`;
@ -21,8 +21,7 @@ if (branchName) {
const reference = branchName.match(/^\d+/);
const referenceTag = `refs #${reference}`;
if (!msg.includes(referenceTag) && reference) {
console.log('reference: ', reference);
if (!msg.includes(referenceTag) || reference) {
const splitedMsg = msg.split(':');