Skip to content

Commit

Permalink
Add advanced-issue-labeler workflow and configuration file. (#1366)
Browse files Browse the repository at this point in the history
  • Loading branch information
yui10 authored Aug 10, 2024
1 parent 1c60b39 commit 576a3f0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/advanced-issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
policy:
- template: ["bug_report.yml"]
section:
- id: ["platforms"]
block-list: []
label:
- name: platforms:Windows
keys: ["Windows"]
- name: platforms:macOS
keys: ["macOS"]
- name: platforms:Linux
keys: ["Linux"]
- id: ["app-kind"]
block-list: []
label:
- name: app-kind:GUI
keys: ["DevToys (app with GUI)"]
- name: app-kind:CLI
keys: ["DevToys CLI"]
35 changes: 35 additions & 0 deletions .github/workflows/issue_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Issue labeler
on:
issues:
types: [opened]

permissions:
contents: read

jobs:
label-component:
runs-on: ubuntu-latest
timeout-minutes: 30

permissions:
issues: write

strategy:
matrix:
template: [bug_report.yml]

steps:
- uses: actions/checkout@v3

- name: Parse issue form
uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }}

- name: Set labels based on component field
uses: redhat-plumbers-in-action/advanced-issue-labeler@v3
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
template: ${{ matrix.template }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 576a3f0

Please sign in to comment.