-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.19 KB
/
triage-prs.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
name: Triage PRs
on:
pull_request:
types: [ labeled ]
jobs:
triage:
permissions:
pull-requests: write
runs-on: ubuntu-latest
name: Faire le triage
strategy:
matrix:
consultation:
- { file: ".github/workflows/comments/pr-duplicate.md", label: "PR duplicate" }
- { file: ".github/workflows/comments/need-improvement.md", label: "need improvement" }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Salle de consultation en ${{ matrix.consultation.label }}
if: ${{ github.event.label.name == matrix.consultation.label }}
run: gh comment ${{ github.event.pull_request.number }} -F ${{ matrix.consultation.file }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
close-pr:
permissions:
pull-requests: write
needs: triage
runs-on: ubuntu-latest
name: Close PR
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Close PR if PR duplicate
if: ${{ github.event.label.name == 'PR duplicate' }}
run: gh pr close ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}