diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 54c00b0a..0114bae2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -33,6 +33,7 @@ body: validations: required: false - type: checkboxes + id: os attributes: label: OS description: Operating System where this occured. @@ -42,6 +43,7 @@ body: - label: termux - label: windows - type: checkboxes + id: shell attributes: label: Shell description: Shell where this occured. diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 00000000..cccf568a --- /dev/null +++ b/.github/workflows/issue-labeler.yml @@ -0,0 +1,29 @@ +name: Label Issues +on: + issues: + types: [opened, edited] + +permissions: + contents: read + +jobs: + label-component: + runs-on: ubuntu-latest + + permissions: + issues: write + + steps: + - uses: actions/checkout@v4 + + - name: Parse issue form + uses: stefanbuck/github-issue-parser@v3 + id: issue-parser + with: + template-path: .github/ISSUE_TEMPLATE/bug_report.yaml + + - name: Set labels based on severity field + uses: redhat-plumbers-in-action/advanced-issue-labeler@v3 + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + token: ${{ secrets.GITHUB_TOKEN }}