diff --git a/README.md b/README.md index cbc0c72..91da37e 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,4 @@ https://github.com/microsoft/vscode-github-triage-actions
and https://github.com/grafana/grafana-github-actions + diff --git a/api/octokit.js b/api/octokit.js index 4b63cac..0f87cae 100644 --- a/api/octokit.js +++ b/api/octokit.js @@ -93,7 +93,7 @@ class OctoKit { isPullRequest: !!issue.pull_request, }; } - async hasWriteAccess(user) { this + async hasWriteAccess(user) { if (user.name in this.writeAccessCache) { core_1.debug('Got permissions from cache for ' + user); return this.writeAccessCache[user.name]; @@ -104,7 +104,6 @@ class OctoKit { ...this.params, username: user.name, })).data.permission; - console.log("######Permission Result \n",this.writeAccessCache[user.name] = permissions === 'admin' ) console.log("######Permission Result \n",permissions === 'write' ) console.log("######Permission Result \n",permissions.toString() ) @@ -457,4 +456,4 @@ function isIssue(object) { 'milestoneId' in object; return isIssue; } -//# sourceMappingURL=octokit.js.map \ No newline at end of file +//# sourceMappingURL=octokit.js.map diff --git a/commands/Commands.js b/commands/Commands.js index 0028616..5b98cde 100644 --- a/commands/Commands.js +++ b/commands/Commands.js @@ -29,8 +29,9 @@ class Commands { } if ('comment' in this.action) { const userStr = await this.fileFetcher() - // test log in action when merge into master - // console.log("########### userStr: \n", userStr.toString()); + + console.log("Test in release 0.2 --data 0706") + console.log("########### userStr: \n", userStr.toString()); console.log("########### this.action.user.name: \n", this.action.user.name); console.log("########### whether has substr: \n", userStr.toString().includes(this.action.user.name)); // 获取返回字符串中的某一个值 return (command.type === 'comment' && @@ -86,7 +87,11 @@ class Commands { if ('comment' in this.action && (command.name === 'label' || command.name === 'assign')) { const args = []; 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("comment str: ", this.action.comment.name) + + console.log("comment str1: ", this.action.comment.toString) + console.log("comment str2: ", this.action.comment.name) + console.log("comment str3: ", this.action.comment) + console.log("argList:", argList.toString()) while (argList) { const task = argList[0] === '-' ? 'remove' : 'add';