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 a version of Node that supports ESM (`v14.15.0+`, or `v16.0.0+`)
- type: input
id: astro-version
attributes:
label: What version of `astro` are you using?
placeholder: 0.0.0
validations:
required: true
- type: input
id: ssr-adapter
attributes:
label: Are you using an SSR adapter? If so, which one?
placeholder: None, or Netlify, Vercel, Cloudflare, etc.
validations:
required: true
- type: input
id: package-manager
attributes:
label: What package manager are you using?
placeholder: npm, yarn, pnpm
validations:
required: true
- type: input
id: os
attributes:
label: What operating system are you using?
placeholder: Mac, Windows, Linux
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: input
id: bug-reproduction
attributes:
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.'
@ -50,6 +56,7 @@ body:
validations:
required: true
- type: checkboxes
id: will-pr
attributes:
label: Participation
options:

View file

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