From d38156ccd7a68e52372b4eb6fc02afbadd5b703e Mon Sep 17 00:00:00 2001 From: sigveio <6737410+sigveio@users.noreply.github.com> Date: Tue, 24 Aug 2021 13:25:29 +0200 Subject: [PATCH] chore: replace issue templates with forms (#11772) --- .github/ISSUE_TEMPLATE/bug.md | 39 ---------- .github/ISSUE_TEMPLATE/bug.yml | 103 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature.md | 29 -------- .github/ISSUE_TEMPLATE/feature.yml | 46 ++++++++++++ .github/ISSUE_TEMPLATE/question.md | 17 ----- .github/ISSUE_TEMPLATE/question.yml | 27 +++++++ .github/ISSUE_TEMPLATE/regression.md | 41 ----------- 7 files changed, 176 insertions(+), 126 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/bug.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature.md create mode 100644 .github/ISSUE_TEMPLATE/feature.yml delete mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/ISSUE_TEMPLATE/question.yml delete mode 100644 .github/ISSUE_TEMPLATE/regression.md diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 02965f38573b..000000000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: 🐛 Bug report -labels: Bug Report, Needs Triage, Needs Repro -about: Create a report to help us improve ---- - - - -## 🐛 Bug Report - - - -## To Reproduce - -Steps to reproduce the behavior: - -## Expected behavior - - - -## Link to repl or repo (highly encouraged) - - - -## envinfo - - - -``` - -``` diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 000000000000..60128a50d325 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,103 @@ +name: Bug Report 🪲 +description: Create a bug report to help us improve +title: '[Bug]: ' +labels: ['Bug Report', 'Needs Triage'] +body: + - type: markdown + attributes: + value: | + # Please follow these steps first: + - type: markdown + attributes: + value: | + ## Troubleshoot + If Jest is not behaving the way you expect, we'd ask you to look at the [documentation](https://jestjs.io/docs/getting-started) and search the issue tracker for evidence supporting your expectation. Please make reasonable efforts to troubleshoot and rule out issues with your code, the configuration, or any 3rd party libraries you might be using. + - type: markdown + attributes: + value: | + ## Ask for help through appropriate channels + If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord channel](https://discord.gg/j6FKKQQrW9) before posting a bug report. The issue tracker is not a help forum. + - type: markdown + attributes: + value: | + ## Verify transformations + It's important to understand that Jest runs the code in your project as JavaScript. If you use syntax not supported by Node.js out of the box - such as React JSX, types from TypeScript, or components from Angular or Vue - that code needs to be [transformed](https://jestjs.io/docs/code-transformation) into plain JavaScript (similar to what you would do when building for browsers). Jest supports this via the [`transform` configuration option](https://jestjs.io/docs/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object). + - type: markdown + attributes: + value: | + ## Make a minimal reproduction + To file the report, you will need a GitHub repository with a minimal (but complete) example and simple/clear steps on how to reproduce the bug. If all your tests fail with a strange error, can you find a way to show us with just one? If you have many configuration options in your `jest.config.js`, can you simplify it? + + The simpler you can make it, the more likely we are to successfully verify and fix the bug. + - type: markdown + attributes: + value: | + :bangbang:   Bug reports without a minimal reproduction will be rejected. :bangbang: + + --- + - type: input + id: version + attributes: + label: Version + description: | + The version of Jest you are using. + Is it the [latest](https://github.com/facebook/jest/releases)? Test and see if the bug has already been fixed. + placeholder: ex. 27.0.6 + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to reproduce + description: Please link to a repository with a minimal reproduction and describe accurately how we can reproduce/verify the bug. + placeholder: | + Example steps (replace with your own): + 1. Clone my repo at https://github.com//example + 2. yarn install + 3. yarn test + 4. You should see the error come up + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + description: A description of what you expect to happen. + placeholder: I expect to see X or Y + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: Actual behavior + description: A clear and concise description of the unexpected behavior. + placeholder: A bug happened! + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional context + description: Anything else that might be relevant + validations: + required: false + - type: textarea + id: envinfo + attributes: + label: Environment + description: | + Please paste the output of running `npx envinfo --preset jest`. + This will be automatically formatted as a code block, so no need for backticks. + placeholder: | + System: + OS: Linux 5.10 Debian GNU/Linux 9 (stretch) + CPU: (8) arm64 + Binaries: + Node: 14.17.0 - /usr/local/bin/node + Yarn: 1.22.5 - /usr/local/bin/yarn + npm: 6.14.13 - /usr/local/bin/npm + npmPackages: + jest: 27.0.6 => 27.0.6 + render: shell + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index 8575c67d9c52..000000000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: 🚀 Feature Proposal -labels: ':rocket: Feature Request' -about: Submit a proposal for a new feature ---- - - - -## 🚀 Feature Proposal - - - -## Motivation - - - -## Example - - - -## Pitch - -Why does this feature belong in the [Jest core platform](https://www.youtube.com/watch?v=NtjyeojAOBs)? - -Common feature proposals that do not typically make it to core: - -- New matchers (see [jest-extended](https://github.com/jest-community/jest-extended)) -- Changes to the default reporter (use custom reporters instead) -- Changes to node/jsdom test environments (use custom environments instead) diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 000000000000..ab85d6d4f02f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,46 @@ +name: Feature Proposal 🚀 +description: Submit a proposal for a new feature +title: '[Feature]: ' +labels: ['🚀 Feature Request'] +body: + - type: markdown + attributes: + value: | + ### Thank you for taking the time to suggest a new feature! + - type: textarea + id: description + attributes: + label: '🚀 Feature Proposal' + description: A clear and concise description of what the feature is. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Motivation + description: Outline your motivation for the proposal. How will it make Jest better? + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Example + description: Describe how this feature would be used. + validations: + required: false + - type: textarea + id: extra + attributes: + label: Pitch + description: | + Why does this feature belong in the [Jest core platform](https://www.youtube.com/watch?v=NtjyeojAOBs)? + validations: + required: true + - type: markdown + attributes: + value: | + Common proposals that do not typically make it to core: + + - New matchers (see [jest-extended](https://github.com/jest-community/jest-extended)) + - Changes to the default reporter (use custom reporters instead) + - Changes to node/jsdom test environments (use custom environments instead) diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 376afea7e4de..000000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: 💬 Questions / Help -label: ':speech_balloon: Question' -about: If you have questions, please check Reactiflux or StackOverflow ---- - - - -## 💬 Questions and Help - -### Please note that this issue tracker is not a help forum and this issue will be closed. - -For questions or help please see: - -- [The Jest help page](https://jestjs.io/help) -- [Our `#testing` channel in Reactiflux](https://discord.gg/j6FKKQQrW9) -- The [jestjs](https://stackoverflow.com/questions/tagged/jestjs) tag on [StackOverflow](https://stackoverflow.com/questions/ask) diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 000000000000..5d14cae2d299 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,27 @@ +name: 'Questions / Help 💬' +description: If you have questions, please check Reactiflux or StackOverflow +title: '[Please read the message below]' +labels: ['💬 Question'] +body: + - type: markdown + attributes: + value: | + ## Questions and Help 💬 + + This issue tracker is reserved for bug reports and feature proposals. + + For anything else, such as questions or getting help, please see: + + - [The Jest help page](https://jestjs.io/help) + - [Our `#testing` channel in Reactiflux](https://discord.gg/j6FKKQQrW9) + - The [jestjs](https://stackoverflow.com/questions/tagged/jestjs) tag on [StackOverflow](https://stackoverflow.com/questions/ask) + - type: checkboxes + id: no-post + attributes: + label: | + Please do not submit this issue. + description: | + :bangbang:   This issue will be closed. :bangbang: + options: + - label: I understand + required: true diff --git a/.github/ISSUE_TEMPLATE/regression.md b/.github/ISSUE_TEMPLATE/regression.md deleted file mode 100644 index 22d65135bb5a..000000000000 --- a/.github/ISSUE_TEMPLATE/regression.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: 💥 Regression Report -labels: ':boom: Regression' -about: Report unexpected behavior that worked in previous versions ---- - - - -## 💥 Regression Report - - - -## Last working version - -Worked up to version: - -Stopped working in version: - -## To Reproduce - -Steps to reproduce the behavior: - -## Expected behavior - - - -## Link to repl or repo (highly encouraged) - - - -## Run `npx envinfo --preset jest` - -Paste the results here: - -``` - -```