Skip to content

Commit

Permalink
Fixing as minor issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gruselhaus committed Jan 10, 2020
1 parent 9efbb48 commit ce70e4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions checkVariations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
})();

0 comments on commit ce70e4b

Please sign in to comment.