|
7 | 7 | label-pr:
|
8 | 8 | if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
|
9 | 9 | runs-on: ubuntu-latest
|
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + pr: |
| 13 | + [ |
| 14 | + { prefix: 'fix', type: 'bug' }, |
| 15 | + { prefix: 'chore', type: 'chore' }, |
| 16 | + { prefix: 'test', type: 'chore' }, |
| 17 | + { prefix: 'ci', type: 'chore' }, |
| 18 | + { prefix: 'feat', type: 'feature' }, |
| 19 | + { prefix: 'security', type: 'security' }, |
| 20 | + ] |
10 | 21 | steps:
|
11 |
| - - uses: erezrokah/[email protected] |
12 |
| - if: startsWith(github.event.pull_request.title, 'fix') |
| 22 | + |
| 23 | + if: startsWith(github.event.pull_request.title, matrix.pr.prefix) |
13 | 24 | with:
|
14 | 25 | token: '${{ secrets.GITHUB_TOKEN }}'
|
15 |
| - label: 'type: bug' |
16 |
| - - uses: erezrokah/[email protected] |
17 |
| - if: startsWith(github.event.pull_request.title, 'chore') || startsWith(github.event.pull_request.title, 'ci') |
18 |
| - with: |
19 |
| - token: '${{ secrets.GITHUB_TOKEN }}' |
20 |
| - label: 'type: chore' |
21 |
| - - uses: erezrokah/[email protected] |
22 |
| - if: startsWith(github.event.pull_request.title, 'feat') |
23 |
| - with: |
24 |
| - token: '${{ secrets.GITHUB_TOKEN }}' |
25 |
| - label: 'type: feature' |
26 |
| - - uses: erezrokah/[email protected] |
27 |
| - if: startsWith(github.event.pull_request.title, 'security') |
28 |
| - with: |
29 |
| - token: '${{ secrets.GITHUB_TOKEN }}' |
30 |
| - label: 'type: security' |
| 26 | + label: 'type: ${{ matrix.pr.type }}' |
0 commit comments