Skip to content

Commit 5ff6500

Browse files
committed
Remove console logs, add theme
1 parent c8dd269 commit 5ff6500

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

scripts/preview-theme.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ async function run() {
8787
const ccc = new ColorContrastChecker();
8888
const warnings = [];
8989
const token = core.getInput("token");
90-
console.log("token?");
91-
console.log(token);
9290
const octokit = github.getOctokit(token || process.env.PERSONAL_TOKEN);
9391
const pullRequestId = getPrNumber();
9492

@@ -108,19 +106,12 @@ async function run() {
108106
const comment = await findComment(octokit, pullRequestId);
109107

110108
const diff = parse(res.data);
111-
const content1 = diff.find((file) => file.to === "themes/index.js")
112-
.chunks[0].changes;
113-
114-
const content = content1
115-
.filter((c) => c.type === "add")
109+
const content = diff
110+
.find((file) => file.to === "themes/index.js")
111+
.chunks[0].changes.filter((c) => c.type === "add")
116112
.map((c) => c.content.replace("+", ""))
117113
.join("");
118114

119-
console.log("content1 diff");
120-
console.log(content1);
121-
console.log("content");
122-
console.log(content);
123-
124115
const themeObject = Hjson.parse(content);
125116
const themeName = Object.keys(themeObject)[0];
126117
const colors = themeObject[themeName];
@@ -194,4 +185,4 @@ async function run() {
194185
}
195186
}
196187

197-
run();
188+
run();

themes/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ const themes = {
361361
text_color: "e0def4",
362362
bg_color: "191724",
363363
},
364+
testinggg: {
365+
title_color: "9ccfd8",
366+
icon_color: "ebbcba",
367+
text_color: "e0def4",
368+
bg_color: "191724",
369+
},
364370
};
365371

366372
module.exports = themes;

0 commit comments

Comments
 (0)