diff --git a/.github/advanced-issue-labeler.yml b/.github/advanced-issue-labeler.yml new file mode 100644 index 000000000..ab1eaacc7 --- /dev/null +++ b/.github/advanced-issue-labeler.yml @@ -0,0 +1,19 @@ +policy: + - section: + - id: [platform] + block-list: [] + label: + - name: 'android' + keys: ['Android'] + - name: 'android-tv' + keys: ['Android TV'] + - name: 'ios' + keys: ['iOS'] + - name: 'linux' + keys: ['Linux'] + - name: 'windows' + keys: ['Windows'] + - name: 'macos' + keys: ['macOS'] + - name: 'web' + keys: ['Web'] diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 000000000..778d929d6 --- /dev/null +++ b/.github/workflows/issue-labeler.yml @@ -0,0 +1,26 @@ +name: Issue Labeler +on: + issues: + types: [opened, edited] + +jobs: + label: + runs-on: ubuntu-latest + permissions: + issues: write + actions: read + contents: read + steps: + - uses: actions/checkout@v4 + + - name: Parse issue body + uses: stefanbuck/github-issue-parser@v3.2.3 + id: issue-parser + with: + template-path: .github/ISSUE_TEMPLATE/bug-report.yml + + - name: Set labels based on platform field + uses: redhat-plumbers-in-action/advanced-issue-labeler@v3.2.4 + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + token: ${{ secrets.GITHUB_TOKEN }}