Skip to content

Commit

Permalink
Improve issue template (#5872)
Browse files Browse the repository at this point in the history
Do not show in changelog
  • Loading branch information
ClementPasteau authored Nov 3, 2023
1 parent 17bc8b5 commit 3a82311
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 31 deletions.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/--automatic-crash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 💥 Automatic crash report
description: Do not use this template for bug reports. This template is only for automatic crash reports.
body:
- type: textarea
id: description
attributes:
label: Describe what you were doing when the crash happened
description: If applicable, add screenshots to help explain your problem.
placeholder: |
1. Went to '...'
2. Clicked on '...'
3. Scrolled down to '...'
4. Saw error
- type: input
id: gdevelop_version
attributes:
label: GDevelop version
description: |
The version of GDevelop used. Leave the prefilled value.
validations:
required: true
- type: textarea
id: platform_info
attributes:
label: Platform info
description: |
The platform you are using GDevelop on. Leave the prefilled value.
- type: textarea
id: error_stack
attributes:
label: Additional error context
description: Additonal context about the problem. Leave the prefilled value.
- type: textarea
id: component_stack
attributes:
label: Additional component context
description: Additonal context about the problem. Leave the prefilled value.
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/--bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ name: 🐛Bug report
description: Create a bug report about GDevelop or the game engine
body:
- type: checkboxes
id: searched_issues
attributes:
label: Is there an existing issue for this?
options:
- label: I have searched the [existing issues](https://github.com/4ian/GDevelop/issues)
required: true
- label: I have searched the [existing issues](https://github.com/4ian/GDevelop/issues)
required: true
- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reproduction_steps
attributes:
label: Steps to reproduce
description: |
Expand All @@ -27,6 +30,7 @@ body:
validations:
required: true
- type: dropdown
id: platform
attributes:
label: GDevelop platform
description: Which platform of GDevelop are you using?
Expand All @@ -38,6 +42,7 @@ body:
validations:
required: true
- type: input
id: gdevelop_version
attributes:
label: GDevelop version
description: |
Expand All @@ -47,6 +52,7 @@ body:
validations:
required: true
- type: textarea
id: platform_info
attributes:
label: Platform info
value: |
Expand All @@ -66,6 +72,7 @@ body:
</details>
- type: textarea
id: additional_context
attributes:
label: Additional context
description: Add any other context about the problem here.
51 changes: 22 additions & 29 deletions newIDE/app/src/UI/ErrorBoundary.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,37 +127,30 @@ export const ErrorFallbackComponent = ({
label={<Trans>Report the issue on GitHub</Trans>}
primary
onClick={() => {
const body = `
=> Please write here a short description of when the error occurred and how to reproduce it.
const templateFile = '--automatic-crash.yml';
const title = 'Crash while using an editor';
const errorStack =
error && error.stack
? `${error.stack.slice(0, 600)}...`
: 'No error found';
const gdevelopVersion = getIDEVersionWithHash();
const platformInfo = `System Version: ${getSystemVersion()}, Arch: ${getArch()}, User Agent: ${getUserAgent()}, Platform: ${getPlatformName()}`;
const additionalContext = componentStack
? `${componentStack.slice(0, 600)}...`
: 'No component stack found';

When you're ready, click on "Submit new issue". Don't change the rest of the message. Thanks!
## Error stack (don't write anything here)
\`\`\`
${error && error.stack ? `${error.stack.slice(0, 600)}...` : 'No error found'}
\`\`\`
## Component stack (don't write anything here)
\`\`\`
${
componentStack
? `${componentStack.slice(0, 600)}...`
: 'No component stack found'
}
\`\`\`
## Other details
* IDE version: ${getIDEVersionWithHash()}
* Arch: ${getArch()},
* Platform Name: ${getPlatformName()},
* System Version: ${getSystemVersion()},
* User Agent: ${getUserAgent()},
`;
Window.openExternalURL(
`https://github.com/4ian/GDevelop/issues/new?body=${encodeURIComponent(
body
)}&title=Crash%20while%20using%20an%20editor`
const baseUrl = new URL(
'https://github.com/4ian/GDevelop/issues/new'
);
baseUrl.searchParams.set('template', templateFile);
baseUrl.searchParams.set('title', title);
baseUrl.searchParams.set('labels', '💥crash');
baseUrl.searchParams.set('gdevelop_version', gdevelopVersion);
baseUrl.searchParams.set('platform_info', platformInfo);
baseUrl.searchParams.set('error_stack', errorStack);
baseUrl.searchParams.set('component_stack', additionalContext);

Window.openExternalURL(baseUrl.href);
}}
/>
</Line>
Expand Down

0 comments on commit 3a82311

Please sign in to comment.