From b205e9ed2d0f3f264a4ff8c8fabbb02bab1ad81c Mon Sep 17 00:00:00 2001 From: wangyuan249 <35907099+wangyuan249@users.noreply.github.com> Date: Wed, 4 Aug 2021 00:13:14 +0800 Subject: [PATCH] Fixcondition (#10) * add log info for spec assgin * fix specific assign --- .idea/workspace.xml | 14 +++++++++++++- commands/Commands.js | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f199c08..c21b26b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -68,6 +68,7 @@ + @@ -90,6 +91,17 @@ + + + + 1628002440114 + + + @@ -110,4 +122,4 @@ - \ No newline at end of file + diff --git a/commands/Commands.js b/commands/Commands.js index 3bef507..5845ced 100644 --- a/commands/Commands.js +++ b/commands/Commands.js @@ -85,6 +85,7 @@ class Commands { let argList = ((_b = (_a = this.action.comment.match(new RegExp(String.raw `(?:\\|/)${command.name}(.*)(?:\r)?(?:\n|$)`))) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '').trim(); console.log("Info comment: ", this.action.comment) console.log("Info argList:", argList.toString()) + const argListCopy = argList while (argList) { const task = argList[0] === '-' ? 'remove' : 'add'; if (task === 'remove') @@ -115,8 +116,9 @@ class Commands { : this.github.removeLabel(arg.name))); } + console.log("Info argListCopy:", argListCopy.toString()) if (command.name === 'assign'){ - if(argList === ''){ + if(argListCopy === ''){ tasks.push(this.github.addAssignee(this.action.user.name)); }else{ tasks.push(...args.map((arg) => arg.task === 'add'