Skip to content
This repository was archived by the owner on Jul 5, 2022. It is now read-only.

Commit ce70e4b

Browse files
committed
Fixing as minor issue
1 parent 9efbb48 commit ce70e4b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

checkVariations.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ const client = new GitHub({
7272
result_table += line;
7373
}
7474

75-
if (current_data === result_table) {
75+
result_table = "### This table is updated automatically\n" + result_table;
76+
77+
if (current_data.body === result_table) {
7678
console.log("\x1b[35m", "Aborting. The data has not changed.");
7779
process.exit(0);
7880
}
7981

8082
//Upload content to GitHub Gist
81-
console.log("\x1b[32m", `Uploading result to GitHub Gist. Gist ID: ${process.env.GIST_ID}`);
82-
await client.patch(`/repos/CodingTrain/website/issues/${process.env.ISSUE_NUMBER}`, {
83+
console.log("\x1b[32m", `Uploading result to GitHub Gist. Issue Number: ${process.env.ISSUE_NUMBER}`);
84+
client.patch(`/repos/CodingTrain/website/issues/${process.env.ISSUE_NUMBER}`, {
8385
body: result_table
8486
});
8587
})();

0 commit comments

Comments
 (0)