Fix GitHub Issue creation link (closes #3257) (#3421)

* Add IDs to bug report issue form
* Replace 'body' with correct input id for prefilling form
This commit is contained in:
Pranav Karawale 2022-05-23 21:32:03 +05:30 committed by GitHub
parent c8174a079a
commit 63c26c1b24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 10 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix GitHub Issues issue creation link.

View file

@ -13,36 +13,42 @@ body:
✅ I am using the **latest version of Astro** and all plugins. ✅ I am using the **latest version of Astro** and all plugins.
✅ I am using a version of Node that supports ESM (`v14.15.0+`, or `v16.0.0+`) ✅ I am using a version of Node that supports ESM (`v14.15.0+`, or `v16.0.0+`)
- type: input - type: input
id: astro-version
attributes: attributes:
label: What version of `astro` are you using? label: What version of `astro` are you using?
placeholder: 0.0.0 placeholder: 0.0.0
validations: validations:
required: true required: true
- type: input - type: input
id: ssr-adapter
attributes: attributes:
label: Are you using an SSR adapter? If so, which one? label: Are you using an SSR adapter? If so, which one?
placeholder: None, or Netlify, Vercel, Cloudflare, etc. placeholder: None, or Netlify, Vercel, Cloudflare, etc.
validations: validations:
required: true required: true
- type: input - type: input
id: package-manager
attributes: attributes:
label: What package manager are you using? label: What package manager are you using?
placeholder: npm, yarn, pnpm placeholder: npm, yarn, pnpm
validations: validations:
required: true required: true
- type: input - type: input
id: os
attributes: attributes:
label: What operating system are you using? label: What operating system are you using?
placeholder: Mac, Windows, Linux placeholder: Mac, Windows, Linux
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: bug-description
attributes: attributes:
label: Describe the Bug label: Describe the Bug
description: A clear and concise description of what the bug is. description: A clear and concise description of what the bug is.
validations: validations:
required: true required: true
- type: input - type: input
id: bug-reproduction
attributes: attributes:
label: Link to Minimal Reproducible Example label: Link to Minimal Reproducible Example
description: 'Use [astro.new](https://astro.new) to create a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed.' description: 'Use [astro.new](https://astro.new) to create a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed.'
@ -50,6 +56,7 @@ body:
validations: validations:
required: true required: true
- type: checkboxes - type: checkboxes
id: will-pr
attributes: attributes:
label: Participation label: Participation
options: options:

View file

@ -251,19 +251,17 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu
const search = new URLSearchParams({ const search = new URLSearchParams({
labels: 'compiler', labels: 'compiler',
title: '🐛 BUG: `@astrojs/compiler` panic', title: '🐛 BUG: `@astrojs/compiler` panic',
body: `### Describe the Bug template: '---01-bug-report.yml',
'bug-description': `\`@astrojs/compiler\` encountered an unrecoverable error when compiling the following file.
\`@astrojs/compiler\` encountered an unrecoverable error when compiling the following file.
**${id.replace(fileURLToPath(config.root), '')}**
**${id.replace(fileURLToPath(config.root), '')}** \`\`\`astro
\`\`\`astro ${source}
${source} \`\`\``,
\`\`\`
`,
}); });
err.url = `https://github.com/withastro/astro/issues/new?${search.toString()}`; err.url = `https://github.com/withastro/astro/issues/new?${search.toString()}`;
err.message = `Error: Uh oh, the Astro compiler encountered an unrecoverable error! err.message = `Error: Uh oh, the Astro compiler encountered an unrecoverable error!
Please open Please open
a GitHub issue using the link below: a GitHub issue using the link below:
${err.url}`; ${err.url}`;