From e5d9a126308fb022f6fa4023a02872e70535690f Mon Sep 17 00:00:00 2001 From: Peter Marcisovsky Date: Tue, 5 Mar 2024 10:31:53 +0100 Subject: [PATCH] refactor: Added github workflows: - Workflows - Issue templates - Pull request templates - main README --- .github/ISSUE_TEMPLATE/bug-report.yml | 62 +++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 14 +++++ .github/ISSUE_TEMPLATE/feature-request.yml | 33 ++++++++++ .github/ISSUE_TEMPLATE/other-issue.yml | 21 +++++++ .../PULL_REQUEST_TEMPLATE/new_component.md | 12 ++++ .../PULL_REQUEST_TEMPLATE/update_component.md | 9 +++ .github/workflows/issue_comment.yml | 24 +++++++ .github/workflows/new_issues.yml | 24 +++++++ .github/workflows/new_prs.yml | 29 +++++++++ .github/workflows/test_sbom.yml | 16 +++++ README.md | 23 +++++++ 11 files changed, 267 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/other-issue.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE/new_component.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/update_component.md create mode 100644 .github/workflows/issue_comment.yml create mode 100644 .github/workflows/new_issues.yml create mode 100644 .github/workflows/new_prs.yml create mode 100644 .github/workflows/test_sbom.yml create mode 100644 README.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000..5429bbf9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,62 @@ +name: Bug report +description: Report build and runtime bugs +labels: ["Type: Bug"] +body: + - type: checkboxes + id: checklist + attributes: + label: Answers checklist. + description: Before submitting a new issue, please follow the checklist and try to find the answer. + options: + - label: I have read the component documentation [ESP-IDF Components](https://components.espressif.com) and the issue is not addressed there. + required: true + - label: I am using target and esp-idf version as defined in component's idf_component.yml + required: true + - label: I have searched the [issue tracker](https://github.com/espressif/esp-usb/issues?q=is%3Aissue) for a similar issue and not found any related issue. + required: true + - type: dropdown + id: component + attributes: + label: Which component are you using? If you choose Other, provide details in More Information. + multiple: false + options: + - device/esp_tinyusb + - host/cdc + - host/hid + - host/msc + - host/uvc + - Other + validations: + required: true + - type: input + id: idf_version + attributes: + label: ESP-IDF version. + description: On which ESP-IDF version does this issue occur on? Run `git describe --tags` in your esp-idf folder to find it. + placeholder: ex. v5.0-rc1 + validations: + required: true + - type: input + id: devkit + attributes: + label: Development Kit. + description: On which Development Kit does this issue occur on? + placeholder: ex. ESP32-Wrover-Kit v2 | Custom Board + validations: + required: true + - type: input + id: component_version + attributes: + label: Used Component version. + description: On which Component version does this issue occur on? Check `dependencies.lock` file in your project root to find it. + placeholder: ex. v1.2.0-rc0 + validations: + required: true + - type: textarea + id: more-info + attributes: + label: More Information. + description: Do you have any other information from investigating this? + placeholder: ex. I tried on my friend's Windows 10 PC and the command works there. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..0423692e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: false +contact_links: + - name: Component Registry + url: https://components.espressif.com + about: Registry with all available ESP-IDF components. + - name: ESP-IDF Programming Guide + url: https://docs.espressif.com/projects/esp-idf/en/latest/ + about: Documentation for configuring and using ESP-IDF. + - name: Espressif documentation page + url: https://www.espressif.com/en/support/download/documents + about: Hardware documentation (datasheets, Technical Reference Manual, etc). + - name: Forum + url: https://esp32.com + about: For questions about using ESP-IDF and/or ESP32 series chips. Please submit all questions starting "How do I..." here. diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000..17b20fb1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,33 @@ +name: Feature request +description: Suggest an idea or new component for this project. +labels: ["Type: Feature Request"] +body: + - type: markdown + attributes: + value: | + * We welcome any ideas or feature requests! It’s helpful if you can explain exactly why the feature would be useful. + * There are usually some outstanding feature requests in the [existing issues list](https://github.com/espressif/esp-usb/labels/Type%3A%20Feature%20Request), feel free to add comments to them. + - type: textarea + id: problem-related + attributes: + label: Is your feature request related to a problem? + description: Please provide a clear and concise description of what the problem is. + placeholder: ex. I'm always frustrated when ... + - 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. + placeholder: ex. When building my application ... + - 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. + placeholder: ex. Choosing other approach wouldn't work, because ... + - type: textarea + id: context + attributes: + label: Additional context. + description: Please add any other context or screenshots about the feature request here. + placeholder: ex. This would work only when ... diff --git a/.github/ISSUE_TEMPLATE/other-issue.yml b/.github/ISSUE_TEMPLATE/other-issue.yml new file mode 100644 index 00000000..03a2ae4f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/other-issue.yml @@ -0,0 +1,21 @@ +name: General issue report +description: File an issue report +body: + - type: checkboxes + id: checklist + attributes: + label: Answers checklist. + description: Before submitting a new issue, please follow the checklist and try to find the answer. + options: + - label: I have read the documentation of the component in question and the issue is not addressed there. + required: true + - label: I have searched the issue tracker for a similar issue and not found a similar issue. + required: true + - type: textarea + id: issue + attributes: + label: General issue report + description: Your issue report goes here. + placeholder: ex. How do I... + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE/new_component.md b/.github/PULL_REQUEST_TEMPLATE/new_component.md new file mode 100644 index 00000000..3f60295e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/new_component.md @@ -0,0 +1,12 @@ +# Checklist + +- [ ] Component contains License +- [ ] Component contains README.md +- [ ] Component contains idf_component.yml file with `url` field defined +- [ ] Component was added to [upload job](https://github.com/espressif/esp-usb/blob/master/.github/workflows/upload_component.yml#L18) +- [ ] Component was added to build job +- [ ] _Optional:_ Component contains unit tests +- [ ] CI passing + +# Change description +_Please describe your change here_ diff --git a/.github/PULL_REQUEST_TEMPLATE/update_component.md b/.github/PULL_REQUEST_TEMPLATE/update_component.md new file mode 100644 index 00000000..68476877 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/update_component.md @@ -0,0 +1,9 @@ +# Checklist + +- [ ] Version in idf_component.yml file bumped +- [ ] CHANGELOG.md entry added +- [ ] _Optional:_ README.md updated +- [ ] CI passing + +# Change description +_Please describe your change here_ diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml new file mode 100644 index 00000000..cbb69e01 --- /dev/null +++ b/.github/workflows/issue_comment.yml @@ -0,0 +1,24 @@ +name: Sync issue comments to JIRA + +# This workflow will be triggered when new issue comment is created (including PR comments) +on: issue_comment + +# Limit to single concurrent run for workflows which can create Jira issues. +# Same concurrency group is used in new_issues.yml +concurrency: jira_issues + +jobs: + sync_issue_comments_to_jira: + name: Sync Issue Comments to Jira + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'espressif' }} + steps: + - uses: actions/checkout@v2 + - name: Sync issue comments to JIRA + uses: espressif/github-actions/sync_issues_to_jira@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: IEC + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/new_issues.yml b/.github/workflows/new_issues.yml new file mode 100644 index 00000000..35fa65cb --- /dev/null +++ b/.github/workflows/new_issues.yml @@ -0,0 +1,24 @@ +name: Sync issues to Jira + +# This workflow will be triggered when a new issue is opened +on: issues + +# Limit to single concurrent run for workflows which can create Jira issues. +# Same concurrency group is used in issue_comment.yml +concurrency: jira_issues + +jobs: + sync_issues_to_jira: + name: Sync issues to Jira + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'espressif' }} + steps: + - uses: actions/checkout@v2 + - name: Sync GitHub issues to Jira project + uses: espressif/github-actions/sync_issues_to_jira@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: IEC + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/new_prs.yml b/.github/workflows/new_prs.yml new file mode 100644 index 00000000..5604e5cb --- /dev/null +++ b/.github/workflows/new_prs.yml @@ -0,0 +1,29 @@ +name: Sync remain PRs to Jira + +# This workflow will be triggered every hour, to sync remaining PRs (i.e. PRs with zero comment) to Jira project +# Note that, PRs can also get synced when new PR comment is created +on: + schedule: + - cron: "0 * * * *" + +# Limit to single concurrent run for workflows which can create Jira issues. +# Same concurrency group is used in issue_comment.yml +concurrency: jira_issues + +jobs: + sync_prs_to_jira: + name: Sync PRs to Jira + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'espressif' }} + steps: + - uses: actions/checkout@v2 + - name: Sync PRs to Jira project + uses: espressif/github-actions/sync_issues_to_jira@master + with: + cron_job: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: IEC + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/test_sbom.yml b/.github/workflows/test_sbom.yml new file mode 100644 index 00000000..5ac9e51c --- /dev/null +++ b/.github/workflows/test_sbom.yml @@ -0,0 +1,16 @@ +name: Run SBOM manifests validation test + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + test_sbom: + name: Run SBOM manifests validation test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + git config --global safe.directory $(pwd) + pip install esp-idf-sbom + python3 -m esp_idf_sbom manifest validate diff --git a/README.md b/README.md new file mode 100644 index 00000000..7e496f7a --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) +[![Build and Run Test Application](https://github.com/espressif/esp-usb/actions/workflows/build_and_run_test_app.yml/badge.svg?branch=master)](https://github.com/espressif/esp-usb/actions/workflows/build_and_run_test_app.yml) +[![Clang-Tidy](https://github.com/espressif/esp-usb/actions/workflows/clang-tidy.yml/badge.svg?branch=master)](https://github.com/espressif/esp-usb/security/code-scanning?query=is%3Aopen+branch%3Amaster) + +# Espressif ESP-USB + +This repository aims to store [ESP-IDF](https://github.com/espressif/esp-idf) USB host and device class drivers +which have been separated and uploaded into [IDF Component Manager](https://components.espressif.com/). + +## Important note +This repository is used only for Espressif components, it is not mean to store third party components. + +## Resources + +[IDF Component Manager](https://github.com/espressif/idf-component-manager) repository. + +## Contribution + +We welcome all contributions to the Component Manager project. + +You can contribute by fixing bugs, adding features, adding documentation or reporting an [issue](https://github.com/espressif/esp-usb/issues). We accept contributions via [Github Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). + +Before reporting an issue, make sure you've searched for a similar one that was already created. \ No newline at end of file