feat: refs #6130 handle branch without task
This commit is contained in:
parent
fa1e679b48
commit
0db4cd7a12
|
@ -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(':');
|
||||
|
||||
|
|
Loading…
Reference in New Issue