diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cd3b9147..ca8ba148 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -29,6 +29,19 @@ body: placeholder: 1.0.0 validations: required: true + - type: dropdown + id: severity + attributes: + label: Severity impact + options: + - Low (visual glitch, minor inconvenience) + - Medium (major inconvenience, but workaround exists) + - High (badly broken, no workaround) + - Critical (data loss, security issue) + - Enhancement (feature request) [we like these too!] + validations: + required: true + - type: dropdown id: platform attributes: diff --git a/.github/advanced-issue-labeler.yml b/.github/advanced-issue-labeler.yml new file mode 100644 index 00000000..a8186bbb --- /dev/null +++ b/.github/advanced-issue-labeler.yml @@ -0,0 +1,25 @@ +# Keep up to date with workflows/issue-create.yml !!! + +# Low (visual glitch, minor inconvenience) +# Medium (major inconvenience, but workaround exists) +# High (badly broken, no workaround) +# Critical (data loss, security issue) +# Enhancement (feature request) [we like these too!] + +policy: + - section: + - id: [severity] + block-list: ['None', 'Other'] + label: + - name: 'kind: low severity' + keys: ['Low (visual glitch, minor inconvenience)'] + - name: 'kind: medium severity' + keys: ['Medium (major inconvenience, but workaround exists)'] + - name: 'kind: high severity' + keys: ['High (badly broken, no workaround)'] + - name: 'kind: critical severity' + keys: ['Critical (data loss, security issue)'] + - name: 'kind: enhancement' + keys: ['Enhancement (feature request) [we like these too!]'] + + diff --git a/.github/workflows/issue-create.yml b/.github/workflows/issue-create.yml new file mode 100644 index 00000000..3b6c8949 --- /dev/null +++ b/.github/workflows/issue-create.yml @@ -0,0 +1,38 @@ +name: Issue labeler +on: + issues: + types: [ opened ] + +permissions: + contents: read + +jobs: + label-component: + runs-on: ubuntu-latest + + permissions: + # required for all workflows + issues: write + + # only required for workflows in private repositories + actions: read + contents: read + + steps: + - uses: actions/checkout@v3 + + - name: Parse issue form + uses: stefanbuck/github-issue-parser@v3 + id: issue-parser + with: + template-path: .github/ISSUE_TEMPLATE/bug_report.yml + + - name: Set labels based on severity field + uses: redhat-plumbers-in-action/advanced-issue-labeler@v2 + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + section: severity + block-list: | + None + Other + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file