From ce70e4ba9d38b0ee7e87138106cce682500c1fbc Mon Sep 17 00:00:00 2001 From: Gruselhaus Date: Fri, 10 Jan 2020 14:56:02 +0100 Subject: [PATCH] Fixing as minor issue --- checkVariations.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/checkVariations.js b/checkVariations.js index f971dea64d..24115b0b20 100644 --- a/checkVariations.js +++ b/checkVariations.js @@ -72,14 +72,16 @@ const client = new GitHub({ result_table += line; } - if (current_data === result_table) { + result_table = "### This table is updated automatically\n" + result_table; + + if (current_data.body === result_table) { console.log("\x1b[35m", "Aborting. The data has not changed."); process.exit(0); } //Upload content to GitHub Gist - console.log("\x1b[32m", `Uploading result to GitHub Gist. Gist ID: ${process.env.GIST_ID}`); - await client.patch(`/repos/CodingTrain/website/issues/${process.env.ISSUE_NUMBER}`, { + console.log("\x1b[32m", `Uploading result to GitHub Gist. Issue Number: ${process.env.ISSUE_NUMBER}`); + client.patch(`/repos/CodingTrain/website/issues/${process.env.ISSUE_NUMBER}`, { body: result_table }); })();