|
1 | 1 | import { mkdir, writeFile } from "node:fs/promises";
|
2 | 2 | import { browsers, features } from "web-features";
|
| 3 | +import dedent from "dedent"; |
3 | 4 |
|
4 | 5 | import { Octokit } from "@octokit/rest";
|
5 | 6 | import { throttling } from "@octokit/plugin-throttling";
|
@@ -68,20 +69,42 @@ async function* iterateIssues(octokit: Octokit, params: IterateIssuesParams) {
|
68 | 69 | function issueBody(id: string, data: (typeof features)[string]) {
|
69 | 70 | // TODO: include MDN links (before caniuse link) when we have web-features-mappings
|
70 | 71 | // as a dependency (see above).
|
71 |
| - return `_This GitHub issue is for collecting web developer signals for ${data.name}._ |
| 72 | + return dedent` |
| 73 | + _This GitHub issue is for collecting web developer signals for ${data.name}._ |
72 | 74 |
|
73 |
| -${data.description_html} |
| 75 | + ${data.description_html} |
74 | 76 |
|
75 |
| -If you're a web developer and you need this feature to be available in all browsers, please give this issue a thumbs up 👍 emoji reaction. |
| 77 | + To learn more about this feature: |
76 | 78 |
|
77 |
| -To learn more about this feature: |
| 79 | + ${data.caniuse ? `- [caniuse.com](https://caniuse.com/${data.caniuse})` : ""} |
| 80 | + - [web features explorer](https://web-platform-dx.github.io/web-features-explorer/features/${id}) |
| 81 | + - [webstatus.dev](https://webstatus.dev/features/${id}) |
| 82 | + - [Specification](${data.spec}) |
78 | 83 |
|
79 |
| -${data.caniuse ? `- [caniuse.com](https://caniuse.com/${data.caniuse})` : ""} |
80 |
| -- [web features explorer](https://web-platform-dx.github.io/web-features-explorer/features/${id}) |
81 |
| -- [webstatus.dev](https://webstatus.dev/features/${id}) |
82 |
| -- [Specification](${data.spec}) |
| 84 | + ## Give us feedback |
83 | 85 |
|
84 |
| -<!-- web-features:${id} -->`; |
| 86 | + If you're pressed for time, but you want this feature to be available in all browsers, please give this issue a thumbs up 👍 emoji reaction. |
| 87 | +
|
| 88 | + However, a much better guide for us is to know how you'd use this feature, and what you're having to do in the meantime. |
| 89 | + This helps us judge the priority versus other features. |
| 90 | +
|
| 91 | + Copy the template below in a comment, and add the details that matter to _you_. |
| 92 | +
|
| 93 | + \`\`\`md |
| 94 | + ## What I want to do with this feature |
| 95 | +
|
| 96 | + <!-- Add your specific use-cases, even if they seem obvious to you. --> |
| 97 | +
|
| 98 | + ## What I'm having to do in the meantime |
| 99 | +
|
| 100 | + <!-- |
| 101 | + Are you having to use another feature instead, a polyfill, or is it blocking you completely? |
| 102 | + Why are the alternatives worse than using this feature? |
| 103 | + --> |
| 104 | + \`\`\` |
| 105 | +
|
| 106 | + <!-- web-features:${id} --> |
| 107 | + `; |
85 | 108 | }
|
86 | 109 |
|
87 | 110 | // Get a map of features to skip with a reason for logging.
|
|
0 commit comments