Skip to content

Commit 85c267f

Browse files
committed
fix: script update
1 parent 26bf0db commit 85c267f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/readme-labels.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
const labels = require("../labels");
1+
import { createRequire } from "module";
2+
const require = createRequire(import.meta.url);
3+
const labels = require("../labels.json");
24
const toMarkdown = (label) => {
3-
return `- ![#${label.color}](https://via.placeholder.com/15/${label.color}/000000?text=+) ${label.name} ${label.description ? "- " + label.description : ""}`;
5+
return `- ![#${label.color}](https://placehold.co/15x15/${label.color}/${label.color}.png) ${label.name} ${label.description ? "- " + label.description : ""}`;
46
};
57

68
const markdown = labels.map(toMarkdown).join("\n");

0 commit comments

Comments
 (0)