Skip to content

Workflow file for this run

# Inspired by: https://github.com/stefanbuck/ristorante
# See: https://stefanbuck.com/blog/codeless-contributions-with-github-issue-forms
---
name: Issue labeler
on:
issues:
types: [ opened ]
jobs:
label-issues-policy:
runs-on: ubuntu-latest
permissions:
issues: write
strategy:
matrix:
template: [ bug.yml, feature.yml, animals.yml ]
steps:
- uses: actions/checkout@v3
- name: Parse issue form
uses: stefanbuck/github-issue-parser@v2
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }}
- name: Set labels based on policy
uses: redhat-plumbers-in-action/advanced-issue-labeler@main
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
template: ${{ matrix.template }}
token: ${{ secrets.GITHUB_TOKEN }}
label-issues-default-policy:
runs-on: ubuntu-latest
permissions:
issues: write
strategy:
matrix:
template: [ default-policy.yml ]
steps:
- uses: actions/checkout@v3
- name: Parse issue form
uses: stefanbuck/github-issue-parser@v2
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }}
- name: Set labels based on policy
uses: redhat-plumbers-in-action/advanced-issue-labeler@main
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
token: ${{ secrets.GITHUB_TOKEN }}
label-issues-without-policy:
runs-on: ubuntu-latest
permissions:
issues: write
strategy:
matrix:
template: [ default.yml ]
steps:
- uses: actions/checkout@v3
- name: Parse issue form
uses: stefanbuck/github-issue-parser@v2
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }}
- name: Set labels based on policy
uses: redhat-plumbers-in-action/advanced-issue-labeler@main
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
section: without-policy
block-list: |
Other
token: ${{ secrets.GITHUB_TOKEN }}