make automatic bug reports use <details>

This commit is contained in:
Send_Nukez 2021-12-20 23:04:46 +01:00
parent ee98ffd134
commit c052260a8b

View file

@ -389,30 +389,29 @@ Dribbblish.on("ready", () => {
data: "Create Report", data: "Create Report",
onChange: () => { onChange: () => {
const reportBody = ` const reportBody = `
${process.env.BUG_REPORT} ${process.env.BUG_REPORT}
<!-- Leave the lines below as they are --> <!-- Leave the lines below as they are -->
--- ---
### Info for Contributors: <details>
<summary>Info for Contributors</summary>
**Versions**
${Dribbblish.config.getOptions("aboutDribbblishInfo").description}
**Extensions** **Versions**
${$(`script[src^="extensions/"]`) ${Dribbblish.config.getOptions("aboutDribbblishInfo").description.split("\n").join("\n ")}
.toArray()
.map((e) => `- ${e.src.split("/").slice(-1)[0]}`)
.join("\n")}
**Settings** **Extensions**
\`\`\`json ${$(`script[src^="extensions/"]`)
${JSON.stringify(Dribbblish.config.export(), null, 4)} .toArray()
\`\`\` .map((e) => `- ${e.src.split("/").slice(-1)[0]}`)
` .join("\n ")}
.split("\n")
.map((line) => line.replace(/^ {16}/, "")) **Settings**
.join("\n"); \`\`\`json
${JSON.stringify(Dribbblish.config.export(), null, 4).split("\n").join("\n ")}
\`\`\`
</details>
`.replace(/^ {12}/gm, "");
const reportURL = new URL("https://github.com/JulienMaille/dribbblish-dynamic-theme/issues/new"); const reportURL = new URL("https://github.com/JulienMaille/dribbblish-dynamic-theme/issues/new");
reportURL.searchParams.set("labels", "bug"); reportURL.searchParams.set("labels", "bug");