-
Notifications
You must be signed in to change notification settings - Fork 4
85 lines (69 loc) · 2.19 KB
/
issue-labeler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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@v3
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@v3
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@v3
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 }}