|
1 |
| -const core = require("@actions/core"); |
2 |
| -const github = require("@actions/github"); |
3 |
| -const parse = require("parse-diff"); |
4 |
| -const Hjson = require("hjson"); |
5 |
| -const snakeCase = require("lodash.snakecase"); |
6 |
| -const ColorContrastChecker = require("color-contrast-checker"); |
| 1 | +import core from "@actions/core"; |
| 2 | +import github from "@actions/github"; |
| 3 | +import ColorContrastChecker from "color-contrast-checker"; |
| 4 | +import * as dotenv from "dotenv"; |
| 5 | +import Hjson from "hjson"; |
| 6 | +import snakeCase from "lodash.snakecase"; |
| 7 | +import parse from "parse-diff"; |
7 | 8 |
|
8 |
| -require("dotenv").config(); |
| 9 | +dotenv.config(); |
9 | 10 |
|
10 | 11 | const OWNER = "anuraghazra";
|
11 | 12 | const REPO = "github-readme-stats";
|
@@ -76,10 +77,10 @@ function getGrsLink(colors) {
|
76 | 77 | }
|
77 | 78 |
|
78 | 79 | const themeContribGuidelines = `
|
79 |
| - \rHi, thanks for the theme contribution, please read our theme [contribution guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). |
| 80 | + \rHi, thanks for the theme contribution, please read our theme [contribution guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). |
80 | 81 | \rWe are currently only accepting color combinations from any VSCode theme or themes which have good color combination to minimize bloating the themes collection.
|
81 | 82 |
|
82 |
| - \r> Also note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization) |
| 83 | + \r> Also note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization) |
83 | 84 | `;
|
84 | 85 |
|
85 | 86 | async function run() {
|
@@ -128,7 +129,7 @@ async function run() {
|
128 | 129 | issue_number: pullRequestId,
|
129 | 130 | body: `
|
130 | 131 | \r**${COMMENT_TITLE}**
|
131 |
| - |
| 132 | +
|
132 | 133 | \rCannot create theme preview
|
133 | 134 |
|
134 | 135 | ${themeContribGuidelines}
|
@@ -167,16 +168,16 @@ async function run() {
|
167 | 168 | owner: OWNER,
|
168 | 169 | repo: REPO,
|
169 | 170 | body: `
|
170 |
| - \r**${COMMENT_TITLE}** |
171 |
| - |
| 171 | + \r**${COMMENT_TITLE}** |
| 172 | +
|
172 | 173 | \r${warnings.map((warning) => `- :warning: ${warning}\n`).join("")}
|
173 | 174 |
|
174 | 175 | \ntitle_color: <code>#${titleColor}</code> | icon_color: <code>#${iconColor}</code> | text_color: <code>#${textColor}</code> | bg_color: <code>#${bgColor}</code>
|
175 |
| - |
| 176 | +
|
176 | 177 | \r[Preview Link](${url})
|
177 | 178 |
|
178 | 179 | \r[](${url})
|
179 |
| - |
| 180 | +
|
180 | 181 | ${themeContribGuidelines}
|
181 | 182 | `,
|
182 | 183 | });
|
|
0 commit comments