From 1f1e0df879a9fe7d58932ddbf6aa31ed709e5c49 Mon Sep 17 00:00:00 2001 From: Maciej Pijanowski Date: Tue, 26 Mar 2024 20:45:24 +0100 Subject: [PATCH] issue labeling Signed-off-by: Maciej Pijanowski --- .github/ISSUE_TEMPLATE/bug_report.yml | 69 ++++++++++++++-- .github/ISSUE_TEMPLATE/dts_bug_report.yml | 98 ----------------------- .github/advanced-issue-labeler.yml | 70 ++++++++++++++++ .github/workflows/issue_labeler.yml | 36 +++++++++ 4 files changed, 170 insertions(+), 103 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/dts_bug_report.yml create mode 100644 .github/advanced-issue-labeler.yml create mode 100644 .github/workflows/issue_labeler.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e06ea3e..afad28d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -7,21 +7,80 @@ body: attributes: value: Thanks for taking the time to fill out this bug report! - - type: input + - type: dropdown + id: component + attributes: + label: Component + description: Please chose components related to this issue. + multiple: true + # When updating list of components please also update labeling policy + # policy: `.github/advanced-issue-labeler.yml` + options: + - 'Dasharo firmware' + - 'Dasharo Tools Suite' + - 'Dasharo documentation' + - 'EC firmware' + - 'other' + validations: + required: true + + - type: dropdown id: device attributes: label: Device - description: The model of device you're using Dasharo on. + description: Model of device(s) on which issue was seen on + multiple: true + # When updating list of components please also update labeling policy + # policy: `.github/advanced-issue-labeler.yml` + options: + - 'Asus KGPE-D16' + - 'Dell OptiPlex 7010' + - 'Dell OptiPlex 9010' + - 'MSI Pro Z690-A' + - 'MSI Pro Z790-P' + - 'NovaCustom NV4x 11th Gen' + - 'NovaCustom NV4x 12th Gen' + - 'NovaCustom NS5x 11th Gen' + - 'NovaCustom NS5x 12th Gen' + - 'NovaCustom NS7x 11th Gen' + - 'NovaCustom NS7x 12th Gen' + - 'PC Engines APU2' + - 'PC Engines APU3' + - 'PC Engines APU4' + - 'PC Engines APU6' + - 'Protectli FW2B' + - 'Protectli FW4B' + - 'Protectli FW4C' + - 'Protectli FW6' + - 'Protectli VP2410' + - 'Protectli VP2420' + - 'Protectli VP4630' + - 'Protectli VP4650' + - 'Protectli VP4670' + - 'Protectli VP6630' + - 'Protectli VP6650' + - 'Protectli VP6670' + - 'QEMU Q35 Emulator' + - 'Raptor CS Talos II' + - 'other' + validations: + required: true + + - type: input + id: version + attributes: + label: Dasharo version + description: The version of Dasharo firmware (e.g., `v0.2.0`), or commit hashes if built from an untagged revision validations: required: false - type: input id: version attributes: - label: Firmware or software name and version - description: The name and version of firmware or software you're using (e.g., `Dasharo v0.2.0`), or commit hashes if built from an untagged revision + label: Dasharo Tools Suite version + description: The version of Dasharo Tools Suite (e.g., `v1.2.0`), or commit hashes if built from an untagged revision; skip if Dasharo Tool Suite has not been used validations: - required: true + required: false - type: textarea id: component diff --git a/.github/ISSUE_TEMPLATE/dts_bug_report.yml b/.github/ISSUE_TEMPLATE/dts_bug_report.yml deleted file mode 100644 index 9eefb49..0000000 --- a/.github/ISSUE_TEMPLATE/dts_bug_report.yml +++ /dev/null @@ -1,98 +0,0 @@ - -description: Report a problem in existing functionality, including documentation and infrastructure. -labels: - - ["bug"] - - ["DasharoToolsSuite"] - -body: - - type: markdown - attributes: - value: Thanks for taking the time to fill out this bug report! - - - type: input - id: device - attributes: - label: Device - description: The model of device you're using DTS on. - validations: - required: false - - - type: input - id: version - attributes: - label: DTS version - description: The version of DTS you're using (e.g., `v0.2.0` or commit if you have built DTS manually) - validations: - required: true - - - type: textarea - id: component - attributes: - label: Affected component(s) or functionality - description: The component or functionality of DTS that is not working as expected. - validations: - required: false - - - type: input - id: summary - attributes: - label: Brief summary - description: A clear and concise summary of the bug. - validations: - required: true - - - type: textarea - id: reproductibility - attributes: - label: How reproducible - description: At what rate does the bug occur when the steps to reproduce are performed? - validations: - required: false - - - type: textarea - id: steps - attributes: - label: How to reproduce - description: List of steps to reproduce the behavior - validations: - required: true - - - type: textarea - id: expected - attributes: - label: Expected behavior - description: A clear and concise description of what you expected to happen. - validations: - required: true - - - type: textarea - id: actual - attributes: - label: Actual behavior - description: What actually happened instead of what you expected to happen. - validations: - required: true - - - type: textarea - id: screenshots - attributes: - label: Screenshots - description: If applicable, add screenshots to help explain your problem. - validations: - required: false - - - type: textarea - id: context - attributes: - label: Additional context - description: Add any other context about the problem here. - validations: - required: false - - - type: textarea - id: solutions - attributes: - label: Solutions you've tried - description: If applicable, any solutions or workarounds you've already tried. - validations: - required: false diff --git a/.github/advanced-issue-labeler.yml b/.github/advanced-issue-labeler.yml new file mode 100644 index 0000000..80b58b4 --- /dev/null +++ b/.github/advanced-issue-labeler.yml @@ -0,0 +1,70 @@ +policy: + - template: [bug_report.yml, feature_request.yml] + section: + - id: [component] + block-list: [other] + label: + - name: firmware + keys: ['Dasharo firmware'] + + - name: DasharoToolsSuite + keys: ['Dasharo Tools Suite'] + + - name: doc + keys: ['Dasharo documentation'] + + - name: EC + keys: ['EC firmware'] + - id: [device] + block-list: [other] + label: + - name: asus_kgpe-d16 + keys: ['Asus KGPE-D16'] + + - name: dell_optiplex_9010 + keys: ['Dell OptiPlex 7010', 'Dell OptiPlex 9010'] + + - name: 'MSI PRO Z690-A boards' + keys: ['MSI Pro Z690-A'] + + - name: 'MSI PRO Z790-P boards' + keys: ['MSI Pro Z790-P'] + + - name: novacustom_nv4x_tgl + keys: ['NovaCustom NV4x 11th Gen'] + + - name: novacustom_nv4x_adl + keys: ['NovaCustom NV4x 12th Gen'] + + - name: novacustom_ns5x/7x_tgl + keys: ['NovaCustom NS5x 11th Gen', 'NovaCustom NS7x 11th Gen'] + + - name: novacustom_ns5x/7x_adl + keys: ['NovaCustom NS5x 11th Gen', 'NovaCustom NS7x 12th Gen'] + + - name: pcengines_apu2 + keys: ['PC Engines APU2', 'PC Engines APU3', 'PC Engines APU4', 'PC Engines APU6'] + + - name: protectli_vault_bsw + keys: ['Protectli FW2B', 'Protectli FW4B', 'Protectli FW4C'] + + - name: protectli_vault_kbl + keys: ['Protectli FW6'] + + - name: protectli_vault_glk + keys: ['Protectli VP2410'] + + - name: protectli_vault_ehl + keys: ['Protectli VP2420'] + + - name: protectli_vault_cml + keys: ['Protectli VP4630', 'Protectli VP4650', 'Protectli VP4670'] + + - name: protectli_vault_adl + keys: ['Protectli VP6630', 'Protectli VP6650', 'Protectli VP6670'] + + - name: qemu_q35 + keys: ['QEMU Q35 Emulator'] + + - name: raptor-cs_talos-2 + keys: ['Raptor CS Talos II'] diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.yml new file mode 100644 index 0000000..e71153a --- /dev/null +++ b/.github/workflows/issue_labeler.yml @@ -0,0 +1,36 @@ +--- + +name: Issue labeler +on: + issues: + types: [ opened ] + +permissions: + contents: read + +jobs: + label-component: + runs-on: ubuntu-22.04 + + permissions: + issues: write + + strategy: + matrix: + template: [ bug_report.yml, feature_request.yml ] + + steps: + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + + - name: Parse issue form + uses: stefanbuck/github-issue-parser@c1a559d78bfb8dd05216dab9ffd2b91082ff5324 + id: issue-parser + with: + template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }} + + - name: Set labels based on component field + uses: redhat-plumbers-in-action/advanced-issue-labeler@9e55064634b67244f7deb4211452b4a7217b93de + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + template: ${{ matrix.template }} + token: ${{ secrets.GITHUB_TOKEN }}