From 1be0dc6885317340acdd3427aa43acc05e7a43d3 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 25 Feb 2025 04:59:16 -0600 Subject: [PATCH] Add issue templates (#16213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follows https://github.com/astral-sh/ruff/pull/15651 Preview: https://github.com/dhruvmanila/ruff-issue-templates/issues GitHub made the interface for single-template repositories worse. While they might fix it, it encouragement to just do this work. They still haven't fixed the teeny tiny emojis which makes me think this won't be fixed quickly. Before: Screenshot 2025-02-17 at 8 26 08 AM After: Screenshot 2025-02-24 at 3 05 35 PM --------- Co-authored-by: Dhruv Manilawala --- .github/ISSUE_TEMPLATE/1_bug_report.yaml | 31 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/2_rule_request.yaml | 10 +++++++ .github/ISSUE_TEMPLATE/3_question.yaml | 18 +++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 10 +++++-- .github/ISSUE_TEMPLATE/issue.yaml | 22 --------------- 5 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/1_bug_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/2_rule_request.yaml create mode 100644 .github/ISSUE_TEMPLATE/3_question.yaml delete mode 100644 .github/ISSUE_TEMPLATE/issue.yaml diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yaml b/.github/ISSUE_TEMPLATE/1_bug_report.yaml new file mode 100644 index 0000000000..ee04a58b62 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1_bug_report.yaml @@ -0,0 +1,31 @@ +name: Bug report +description: Report an error or unexpected behavior +body: + - type: markdown + attributes: + value: | + Thank you for taking the time to report an issue! We're glad to have you involved with Ruff. + + **Before reporting, please make sure to search through [existing issues](https://github.com/astral-sh/ruff/issues?q=is:issue+is:open+label:bug) (including [closed](https://github.com/astral-sh/ruff/issues?q=is:issue%20state:closed%20label:bug)).** + + - type: textarea + attributes: + label: Summary + description: | + A clear and concise description of the bug, including a minimal reproducible example. + + Be sure to include the command you invoked (e.g., `ruff check /path/to/file.py --fix`), ideally including the `--isolated` flag and + the current Ruff settings (e.g., relevant sections from your `pyproject.toml`). + + If possible, try to include the [playground](https://play.ruff.rs) link that reproduces this issue. + + validations: + required: true + + - type: input + attributes: + label: Version + description: What version of ruff are you using? (see `ruff version`) + placeholder: e.g., ruff 0.9.3 (90589372d 2025-01-23) + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/2_rule_request.yaml b/.github/ISSUE_TEMPLATE/2_rule_request.yaml new file mode 100644 index 0000000000..02aad445bd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_rule_request.yaml @@ -0,0 +1,10 @@ +name: Rule request +description: Anything related to lint rules (proposing new rules, changes to existing rules, auto-fixes, etc.) +body: + - type: textarea + attributes: + label: Summary + description: | + A clear and concise description of the relevant request. If applicable, please describe the current behavior as well. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/3_question.yaml b/.github/ISSUE_TEMPLATE/3_question.yaml new file mode 100644 index 0000000000..4fa356648f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3_question.yaml @@ -0,0 +1,18 @@ +name: Question +description: Ask a question about Ruff +labels: ["question"] +body: + - type: textarea + attributes: + label: Question + description: Describe your question in detail. + validations: + required: true + + - type: input + attributes: + label: Version + description: What version of ruff are you using? (see `ruff version`) + placeholder: e.g., ruff 0.9.3 (90589372d 2025-01-23) + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3163fd16e9..7c58301908 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,2 +1,8 @@ -# This file cannot use the extension `.yaml`. -blank_issues_enabled: false +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://docs.astral.sh/ruff + about: Please consult the documentation before creating an issue. + - name: Community + url: https://discord.com/invite/astral-sh + about: Join our Discord community to ask questions and collaborate. diff --git a/.github/ISSUE_TEMPLATE/issue.yaml b/.github/ISSUE_TEMPLATE/issue.yaml deleted file mode 100644 index 44f25e284f..0000000000 --- a/.github/ISSUE_TEMPLATE/issue.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: New issue -description: A generic issue - -body: - - type: markdown - attributes: - value: | - Thank you for taking the time to report an issue! We're glad to have you involved with Ruff. - - If you're filing a bug report, please consider including the following information: - - * List of keywords you searched for before creating this issue. Write them down here so that others can find this issue more easily and help provide feedback. - e.g. "RUF001", "unused variable", "Jupyter notebook" - * A minimal code snippet that reproduces the bug. - * The command you invoked (e.g., `ruff /path/to/file.py --fix`), ideally including the `--isolated` flag. - * The current Ruff settings (any relevant sections from your `pyproject.toml`). - * The current Ruff version (`ruff --version`). - - - type: textarea - attributes: - label: Description - description: A description of the issue