From 3f4a44c8282a34f6fc70e0f4a6246061c514aeb0 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 27 Jan 2020 20:19:56 +0300 Subject: [PATCH] Fixed wrong checking of index in auto-closer Github Action. --- .github/workflows/issue_closer.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue_closer.yml b/.github/workflows/issue_closer.yml index 4ad34baa7..8e5984df0 100644 --- a/.github/workflows/issue_closer.yml +++ b/.github/workflows/issue_closer.yml @@ -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);