From d4121d986b0cdb2a07c909cc6bf8d64f95e05bde Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Fri, 12 Jul 2024 07:57:58 +0200 Subject: [PATCH] Update issue templates + issue reproduction doc --- .github/ISSUE_TEMPLATE/01-bug_report.md | 21 ---------- .github/ISSUE_TEMPLATE/01-bug_report.yaml | 26 ++++++++++++ .github/ISSUE_TEMPLATE/02-regression.md | 24 ----------- .github/ISSUE_TEMPLATE/02-regression.yaml | 40 +++++++++++++++++++ .../content/docs/guides/issue-reproduction.md | 22 +++++++--- 5 files changed, 82 insertions(+), 51 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/01-bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/01-bug_report.yaml delete mode 100644 .github/ISSUE_TEMPLATE/02-regression.md create mode 100644 .github/ISSUE_TEMPLATE/02-regression.yaml diff --git a/.github/ISSUE_TEMPLATE/01-bug_report.md b/.github/ISSUE_TEMPLATE/01-bug_report.md deleted file mode 100644 index 02d1509e7..000000000 --- a/.github/ISSUE_TEMPLATE/01-bug_report.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: 🐛 Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' ---- - - diff --git a/.github/ISSUE_TEMPLATE/01-bug_report.yaml b/.github/ISSUE_TEMPLATE/01-bug_report.yaml new file mode 100644 index 000000000..b69d5714b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-bug_report.yaml @@ -0,0 +1,26 @@ +name: 🐛 Bug report +description: Create a report to help us improve +labels: ['bug'] +body: + - type: markdown + attributes: + value: | + Please make sure you have read the docs and are using the latest version of Knip. Use common sense and provide the necessary information that helps me or others to help you. + + A minimal reproduction is required: only the code and configuration required to demonstrate the issue. + + Please make sure you've read https://knip.dev/guides/issue-reproduction. + - type: input + id: reproduction + attributes: + label: Reproduction url + description: Please link to the location of the issue reproduction + validations: + required: true + - type: textarea + id: description + attributes: + label: Description of the issue + description: What happened, and what would you expect to happen? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/02-regression.md b/.github/ISSUE_TEMPLATE/02-regression.md deleted file mode 100644 index 4855a9dc8..000000000 --- a/.github/ISSUE_TEMPLATE/02-regression.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: 🐛 Regression -about: Something that worked properly before, but no longer does -title: '' -labels: regression -assignees: '' ---- - - diff --git a/.github/ISSUE_TEMPLATE/02-regression.yaml b/.github/ISSUE_TEMPLATE/02-regression.yaml new file mode 100644 index 000000000..ac4261d8b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-regression.yaml @@ -0,0 +1,40 @@ +name: 🐛 Regression +description: Something that worked properly before, but no longer does +labels: ['regression'] +body: + - type: markdown + attributes: + value: | + Please make sure you have read the docs and are using the latest version of Knip. Use common sense and provide the necessary information that helps me or others to help you. + + A minimal reproduction is required: only the code and configuration required to demonstrate the issue. + + Please make sure you've read https://knip.dev/guides/issue-reproduction. + - type: input + id: reproduction + attributes: + label: Reproduction url + description: Please link to the location of the issue reproduction + validations: + required: true + - type: input + id: latest-version + attributes: + label: Reproduction url + description: What's the latest version it worked as expected? + validations: + required: true + - type: input + id: first-version + attributes: + label: Reproduction url + description: What's the first version it no longer works as expected? + validations: + required: true + - type: textarea + id: description + attributes: + label: Description of the regression + description: What happened before, what happens now? + validations: + required: true diff --git a/packages/docs/src/content/docs/guides/issue-reproduction.md b/packages/docs/src/content/docs/guides/issue-reproduction.md index 0ae273bfc..445e43dab 100644 --- a/packages/docs/src/content/docs/guides/issue-reproduction.md +++ b/packages/docs/src/content/docs/guides/issue-reproduction.md @@ -6,9 +6,19 @@ If you encounter an issue or false positives when using Knip, you can [open an issue on GitHub][1]. This will help you in your project, and will also improve Knip for everyone else! -Since many factors may influence the issue at hand, in most cases you'll be -asked to provide a minimal reproduction. This contains only the source code and -configuration required to demonstrate the issue. Providing this with a clear +There are many factors that may influence the issue at hand, such as: + +- Code syntax, import and export structure in source files +- Dependencies, scripts and entry files in `package.json` +- TypeScript configuration in `tsconfig.json` +- Enabled plugins and configuration files for that tooling +- Dependent or depending workspaces in a monorepo +- Knip configuration in `knip.json` + +Think of Knip like a kitchen sink, it handles a large amount of projects and +configurations, and your project is different from all others. That's why it's +required to provide a minimal reproduction. This contains only the source code +and configuration required to demonstrate the issue. Providing this with a clear issue description will help us help you, and greatly improves the chances your issue will be looked into efficiently and in a timely manner. @@ -20,9 +30,9 @@ source code and configuration is complete and actionable. Before opening an issue, please make sure you.. -- have searched [open issues][1] for the same. -- have checked the list of [known issues][2]. -- are using the latest version. +- have searched [open issues][1] for the same, +- have checked the list of [known issues][2], +- are using the latest version, - have read the documentation. Please file only a single issue at a time, so each of them can be labeled and