From 6c0c8b7484870da009d580060a4918550eba7bb2 Mon Sep 17 00:00:00 2001 From: Larry Wu Date: Wed, 23 Jul 2025 00:38:03 +0800 Subject: [PATCH] 1. Update bug/feature report template to add component selection. (#2485) 2. Add workflow to apply component label automatically --- .github/ISSUE_TEMPLATE/bug_report.md | 23 ----------- .github/ISSUE_TEMPLATE/bug_report.yml | 38 +++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 --------- .github/ISSUE_TEMPLATE/feature_request.yml | 35 ++++++++++++++++ .github/workflows/auto-label-issues.yml | 47 ++++++++++++++++++++++ 5 files changed, 120 insertions(+), 43 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/workflows/auto-label-issues.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 8165ec95..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Bug report -about: Create a bug report to help us improve CUTLASS -title: "[BUG]" -labels: "? - Needs Triage, bug" -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Steps/Code to reproduce bug** -Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment details (please complete the following information):** - - Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..f9d15e1c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,38 @@ +name: Bug Report +description: Create a bug report to help us improve CUTLASS +title: "[BUG] " +labels: ["? - Needs Triage", "bug"] +assignees: [] + +body: + - type: dropdown + id: component + attributes: + label: Which component has the problem? + options: + - CuTe DSL + - CUTLASS C++ + validations: + required: true + - type: textarea + id: bug-report + attributes: + label: Bug Report + description: Please fill out all sections below + value: | + **Describe the bug** + A clear and concise description of what the bug is. + + **Steps/Code to reproduce bug** + Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly. + + **Expected behavior** + A clear and concise description of what you expected to happen. + + **Environment details (please complete the following information):** + - Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)] + + **Additional context** + Add any other context about the problem here. + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 9ea8e6de..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for CUTLASS -title: "[FEA]" -labels: "? - Needs Triage, feature request" -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I wish I could use CUTLASS to do [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context, code examples, or references to existing implementations about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..4f1d6165 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,35 @@ +name: Feature Request +description: Suggest an idea for CUTLASS +title: "[FEA] " +labels: ["? - Needs Triage", "feature request"] +assignees: [] + +body: + - type: dropdown + id: component + attributes: + label: Which component requires the feature? + options: + - CuTe DSL + - CUTLASS C++ + validations: + required: true + - type: textarea + id: feature-request + attributes: + label: Feature Request + description: Please fill out all sections below + value: | + **Is your feature request related to a problem? Please describe.** + A clear and concise description of what the problem is. Ex. I wish I could use CUTLASS to do [...] + + **Describe the solution you'd like** + A clear and concise description of what you want to happen. + + **Describe alternatives you've considered** + A clear and concise description of any alternative solutions or features you've considered. + + **Additional context** + Add any other context, code examples, or references to existing implementations about the feature request here. + validations: + required: true \ No newline at end of file diff --git a/.github/workflows/auto-label-issues.yml b/.github/workflows/auto-label-issues.yml new file mode 100644 index 00000000..8fa5e66f --- /dev/null +++ b/.github/workflows/auto-label-issues.yml @@ -0,0 +1,47 @@ +name: Auto Label Issues + +on: + issues: + types: [opened] + +jobs: + add-labels: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Add component label + uses: actions/github-script@v7 + with: + script: | + const issue = context.payload.issue; + const body = issue.body || ''; + + // Parse the issue body to find the component selection + // GitHub renders dropdown selections as "### Which component has the problem?\n\n{selection}" + const componentMatch = body.match(/### Which component has the problem\?\s*\n\s*\n\s*(.+?)(?:\n|$)/); + + if (componentMatch) { + const component = componentMatch[1].trim(); + let label = ''; + + // Map component selections to labels + switch(component) { + case 'CuTe DSL': + label = 'CuTe DSL'; + break; + case 'CUTLASS C++': + label = 'CUTLASS C++'; + break; + } + + if (label) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: [label] + }); + console.log(`Added label: ${label}`); + } + } \ No newline at end of file