refactor: Add severity dropdown to bug report template

This commit is contained in:
Mauro Balades
2024-07-29 00:43:01 +02:00
parent 2dd50cfe9a
commit 5985420dbb
3 changed files with 76 additions and 0 deletions

View File

@@ -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:

25
.github/advanced-issue-labeler.yml vendored Normal file
View File

@@ -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!]']

38
.github/workflows/issue-create.yml vendored Normal file
View File

@@ -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 }}