From 08dda772ec0baaf4bd2a9b0710ac7e44d75c532e Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 21 Jul 2024 13:26:40 +0200 Subject: [PATCH] added labeler --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/advanced-issue-labeler.yml | 35 ++++++++++++++++++++++++++ .github/workflows/issue-labeler.yml | 29 +++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/advanced-issue-labeler.yml 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 20808067bb..372d7b3983 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -37,8 +37,8 @@ body: label: OS description: Operating System where this occured. options: + - label: Darwin - label: Linux - - label: OSX - label: Termux - label: Windows - type: checkboxes diff --git a/.github/advanced-issue-labeler.yml b/.github/advanced-issue-labeler.yml new file mode 100644 index 0000000000..bf87cb8762 --- /dev/null +++ b/.github/advanced-issue-labeler.yml @@ -0,0 +1,35 @@ +# syntax - https://github.com/redhat-plumbers-in-action/advanced-issue-labeler#policy +--- +policy: + - section: + - id: ["os"] + label: + - name: "ver: 1.6.x" + keys: ["v1_6", "v1.6", "1.6.x"] + - name: linux + keys: ["Linux"] + - name: darwin + keys: ["Darwin"] + - name: termux + keys: ["Termux"] + - name: windows + keys: ["Windows"] + + - id: ["shell"] + label: + - name: bash + keys: ["Bash"] + - name: elvish + keys: ["Elvish"] + - name: fish + keys: ["Fish"] + - name: nushell + keys: ["Nushell"] + - name: oil + keys: ["Oil"] + - name: powershell + keys: ["Powershell"] + - name: xonsh + keys: ["Xonsh"] + - name: zsh + keys: ["Zsh"] diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 0000000000..8e3bea93ae --- /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 issue labels + uses: redhat-plumbers-in-action/advanced-issue-labeler@v3 + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + token: ${{ secrets.GITHUB_TOKEN }}