From e8bdf9ca794308721587b985fb9944cec5617dea Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 21 Jul 2024 13:00:02 +0200 Subject: [PATCH] added issue labeler --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 ++ .github/workflows/issue-labeler.yml | 29 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/issue-labeler.yml 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 }}