summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pranav Karawale <52596591+retronav@users.noreply.github.com> 2022-05-23 21:32:03 +0530
committerGravatar GitHub <noreply@github.com> 2022-05-23 11:02:03 -0500
commit63c26c1b24a07a313e0bcf99b35089e23f0cf7fc (patch)
treeeaf9a94b9806f33d19d4e65c5be01879b0794603
parentc8174a079a67b07d6dc0503ce8853303baca0f8e (diff)
downloadastro-63c26c1b24a07a313e0bcf99b35089e23f0cf7fc.tar.gz
astro-63c26c1b24a07a313e0bcf99b35089e23f0cf7fc.tar.zst
astro-63c26c1b24a07a313e0bcf99b35089e23f0cf7fc.zip
Fix GitHub Issue creation link (closes #3257) (#3421)
* Add IDs to bug report issue form * Replace 'body' with correct input id for prefilling form
-rw-r--r--.changeset/hungry-elephants-smash.md5
-rw-r--r--.github/ISSUE_TEMPLATE/---01-bug-report.yml7
-rw-r--r--packages/astro/src/vite-plugin-astro/index.ts18
3 files changed, 20 insertions, 10 deletions
diff --git a/.changeset/hungry-elephants-smash.md b/.changeset/hungry-elephants-smash.md
new file mode 100644
index 000000000..2c6765666
--- /dev/null
+++ b/.changeset/hungry-elephants-smash.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fix GitHub Issues issue creation link.
diff --git a/.github/ISSUE_TEMPLATE/---01-bug-report.yml b/.github/ISSUE_TEMPLATE/---01-bug-report.yml
index 1b241039a..05d9fe549 100644
--- a/.github/ISSUE_TEMPLATE/---01-bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/---01-bug-report.yml
@@ -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:
diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts
index 4be0472cb..404e21476 100644
--- a/packages/astro/src/vite-plugin-astro/index.ts
+++ b/packages/astro/src/vite-plugin-astro/index.ts
@@ -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}`;