Fixed wrong checking of index in auto-closer Github Action.

This commit is contained in:
23rd 2020-01-27 20:19:56 +03:00
parent 327c9caed7
commit 3f4a44c828
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ jobs:
let body = context.payload.issue.body;
console.log("Body of issue:\n" + body);
let index1 = body.indexOf(item1) + item1.length;
let index1 = body.indexOf(item1);
let index2 = body.indexOf(item2);
index2 = (index2 == -1) ? Number.MAX_SAFE_INTEGER : index2;
@ -46,7 +46,7 @@ jobs:
return version[0].split(".")[0];
}
let issueVer = parseVersion(body.substring(index1, index2));
let issueVer = parseVersion(body.substring(index1 + item1.length, index2));
if (issueVer == undefined) {
console.log(errorStr);