From cf0e832f2b1a2c9d8f09703fb10171484a41536f Mon Sep 17 00:00:00 2001
From: simbit18 <101105604+simbit18@users.noreply.github.com>
Date: Fri, 2 Aug 2024 12:49:35 +0200
Subject: [PATCH] Added Issue templates
Template
Bug report
Report a bug to improve NuttX stability
Feature request
Request an enhancement for NuttX
General Help
Get general support regarding NuttX
Action
An action for automatically labelling issues
---
.github/ISSUE_TEMPLATE/001_bug_report.yml | 147 ++++++++++++++++++
.../ISSUE_TEMPLATE/002_feature_request.yml | 62 ++++++++
.github/ISSUE_TEMPLATE/003_help.yml | 54 +++++++
.github/ISSUE_TEMPLATE/config.yml | 1 +
.github/workflows/issue_labeler.yml | 50 ++++++
5 files changed, 314 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/001_bug_report.yml
create mode 100644 .github/ISSUE_TEMPLATE/002_feature_request.yml
create mode 100644 .github/ISSUE_TEMPLATE/003_help.yml
create mode 100644 .github/ISSUE_TEMPLATE/config.yml
create mode 100644 .github/workflows/issue_labeler.yml
diff --git a/.github/ISSUE_TEMPLATE/001_bug_report.yml b/.github/ISSUE_TEMPLATE/001_bug_report.yml
new file mode 100644
index 0000000000..b707c76284
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/001_bug_report.yml
@@ -0,0 +1,147 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: Bug report
+description: Report a bug to improve NuttX stability
+title: "[BUG]
"
+labels: [👀 needs triage, bug]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Hello NuttX Community member! Please keep things tidy by putting your post in the proper place:
+
+ Reporting a bug: use this form.
+ Asking a question or getting help: use the [General Help](https://github.com/simbit18/nuttx-testing-templates/issues/new?assignees=&labels=question&projects=&template=003_help.yml&title=help%3A+help+title) form or [Mailing list](https://nuttx.apache.org/community/).
+ Requesting a new feature: use the [Feature request](https://github.com/simbit18/nuttx-testing-templates/issues/new?assignees=&labels=enhancement&projects=&template=002_feature_request.yml) form.
+ - type: textarea
+ attributes:
+ label: "Description / Steps to reproduce the issue"
+ description: "A clear and concise description of what the bug is, and why you consider it to be a bug, and steps for how to reproduce it"
+ placeholder: |
+ A description with steps to reproduce the issue.
+ May include logs, images, or videos.
+ 1. Step 1
+ 2. Step 2
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: |
+ ### Environment
+ Please specify your environment.
+
+ - type: dropdown
+ id: os
+ attributes:
+ label: On which OS does this issue occur?
+ multiple: true
+ options:
+ - "[Linux]"
+ - "[Mac]"
+ - "[Windows]"
+ - "[Other]"
+ validations:
+ required: true
+
+ - type: input
+ id: os_version
+ attributes:
+ label: What is the version of your OS?
+ description: Please fill out the distro or OS version from the previous dropdown
+ placeholder: "MacOS 14, Ubuntu 23.10, Windows 10/MSYS_NT-10.0-19045, ecc"
+ validations:
+ required: true
+
+ - type: input
+ attributes:
+ label: NuttX Version
+ placeholder: "e.g., master, 12.5.1, ecc"
+ validations:
+ required: true
+
+ - type: dropdown
+ id: architecture
+ attributes:
+ label: Issue Architecture
+ description: What architecture(s) are you seeing the problem on?
+ multiple: true
+ options:
+ - "[all]"
+ - "[arm]"
+ - "[arm64]"
+ - "[avr]"
+ - "[ceva]"
+ - "[hc]"
+ - "[mips]"
+ - "[misoc]"
+ - "[openrisc]"
+ - "[renesas]"
+ - "[risc-v]"
+ - "[simulator]"
+ - "[sparc]"
+ - "[tricore]"
+ - "[x86]"
+ - "[x86_64]"
+ - "[xtensa]"
+ - "[z16]"
+ - "[z80]"
+ validations:
+ required: true
+
+ - type: dropdown
+ id: area
+ attributes:
+ label: Issue Area
+ description: What area(s) are you seeing the problem on?
+ multiple: true
+ options:
+ - "[Other]"
+ - "[Applications]"
+ - "[Api]"
+ - "[Board support]"
+ - "[Build System]"
+ - "[Configuring]"
+ - "[Debugging]"
+ - "[Drivers]"
+ - "[File System]"
+ - "[Installing]"
+ - "[Kconfig]"
+ - "[Kernel]"
+ - "[Memory Management]"
+ - "[Native port]"
+ - "[Networking]"
+ - "[OS Components]"
+ - "[Posix]"
+ - "[Sensors]"
+ - "[Specific Peripheral]"
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: |
+ ### Before You Submit
+
+ Please verify that you've followed these steps:
+ - Confirm the problem is reproducible on [**master**](https://github.com/apache/nuttx) or [**latest stable**](https://nuttx.apache.org/download) release.
+ - Run `make distclean` when encountering build issues.
+ - Search [existing issues](https://github.com/apache/nuttx/issues) (including [closed](https://github.com/apache/nuttx/issues?q=is%3Aissue+is%3Aclosed))
+ - Read the [FAQ](https://nuttx.apache.org/docs/latest/faq/index.html).
+
+ - type: checkboxes
+ attributes:
+ label: "Verification"
+ options:
+ - label: "I have verified before submitting the report."
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/002_feature_request.yml b/.github/ISSUE_TEMPLATE/002_feature_request.yml
new file mode 100644
index 0000000000..dd1459ef98
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/002_feature_request.yml
@@ -0,0 +1,62 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: Feature request
+description: Request an enhancement for NuttX
+title: "[FEATURE] "
+labels: [enhancement]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Hello NuttX Community member! Please keep things tidy by putting your post in the proper place:
+
+ Requesting a new feature: use this form.
+ Asking a question or getting help: use the [General Help](https://github.com/simbit18/nuttx-testing-templates/issues/new?assignees=&labels=question&projects=&template=003_help.yml&title=help%3A+help+title) form or [Mailing list](https://nuttx.apache.org/community/).
+ Reporting a bug: use the [Bug report](https://github.com/simbit18/nuttx-testing-templates/issues/new?assignees=&labels=bug&projects=&template=001_bug_report.yml) form.
+
+ - type: textarea
+ id: question-description
+ attributes:
+ label: Is your feature request related to a problem? Please describe.
+ description: Please provide a clear and concise description of what the problem is. Add relevant issue link.
+ validations:
+ required: true
+
+ - type: textarea
+ id: solution
+ attributes:
+ label: Describe the solution you'd like
+ description: Please provide a clear and concise description of what you want to happen.
+ validations:
+ required: true
+
+ - type: textarea
+ id: alternatives
+ attributes:
+ label: Describe alternatives you've considered
+ description: Please provide a clear and concise description of any alternative solutions or features you've considered.
+
+ - type: markdown
+ attributes:
+ value: |
+ ### Before You Submit
+
+ Please verify that you've followed these steps:
+ - Search [existing feature requests](https://github.com/apache/nuttx/issues) (including [closed](https://github.com/apache/nuttx/issues?q=is%3Aissue+is%3Aclosed))
+
+ - type: checkboxes
+ attributes:
+ label: "Verification"
+ options:
+ - label: "I have verified before submitting the report."
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/003_help.yml b/.github/ISSUE_TEMPLATE/003_help.yml
new file mode 100644
index 0000000000..30818b5dc9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/003_help.yml
@@ -0,0 +1,54 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: General Help
+description: Get general support regarding NuttX
+title: "[HELP] "
+labels: [question]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Hello NuttX Community member! Please keep things tidy by putting your post in the proper place:
+
+ Asking a question or getting help: use this form or [Mailing list](https://nuttx.apache.org/community/).
+ Reporting a bug: use the [Bug report](https://github.com/simbit18/nuttx-testing-templates/issues/new?assignees=&labels=bug&projects=&template=001_bug_report.yml) form.
+ Requesting a new feature: use the [Feature request](https://github.com/simbit18/nuttx-testing-templates/issues/new?assignees=&labels=enhancement&projects=&template=002_feature_request.yml) form
+
+ - type: markdown
+ attributes:
+ value: |
+ ### Whether you're a beginner or an experienced developer, NuttX Help is here to assist you with all your NuttX questions and concerns.
+
+ - type: textarea
+ id: question-description
+ attributes:
+ label: Description
+ description: Explain the background or context of your question. This helps others understand your problem or inquiry better.
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: |
+ ### Before You Submit
+
+ Please verify that you've followed these steps:
+ - I have searched [NuttX Documentation](https://nuttx.apache.org/docs/latest/) and didn't find an answer to my question.
+ - Search [existing issues](https://github.com/apache/nuttx/issues) (including [closed](https://github.com/apache/nuttx/issues?q=is%3Aissue+is%3Aclosed))
+
+ - type: checkboxes
+ attributes:
+ label: "Verification"
+ options:
+ - label: "I have verified before submitting the report."
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000000..3ba13e0cec
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: false
diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.yml
new file mode 100644
index 0000000000..7f36edebe2
--- /dev/null
+++ b/.github/workflows/issue_labeler.yml
@@ -0,0 +1,50 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: Issue Labeler
+
+on:
+ issues:
+ types: [opened]
+
+jobs:
+ label:
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ steps:
+ - name: Add labels issues automatically based on their body.
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const body = context.payload.issue.body;
+ const bodySplit = body.split(/\[|\]/).map(e => e.toLowerCase());
+ const oskeywords = ['other', 'linux', 'mac', 'Windows'];
+ const archkeywords1 = ['all', 'arm', 'arm64', 'avr', 'ceva', 'hc', 'mips', 'misoc', 'openrisc', 'renesas'];
+ const archkeywords2 = ['risc-v', 'simulator', 'sparc', 'tricore', 'x86', 'x86_64', 'xtensa', 'z16', 'z80', 'renesas'];
+ const areakeywords1 = ['applications', 'api', 'board support', 'build system', 'configuring', 'debugging', 'drivers', 'file system', 'installing', 'kconfig'];
+ const areakeywords2 = ['kernel', 'memory management', 'native port', 'networking', 'os components', 'posix', 'sensors', 'specific peripheral', 'openrisc', 'renesas'];
+ const keywords = [...oskeywords, ...archkeywords1, ...archkeywords2, ...areakeywords1, ...areakeywords2];
+ var keywordsfound = new Set();
+ for (const keyword of keywords) {
+ if (bodySplit.includes(keyword)) {
+ keywordsfound.add(keyword)
+ }
+ }
+ if (keywordsfound.size !== 0) {
+ github.rest.issues.addLabels({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ labels: Array.from(keywordsfound)
+ })
+ }
\ No newline at end of file