-
-
Notifications
You must be signed in to change notification settings - Fork 454
42 lines (36 loc) · 1.35 KB
/
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
name: "Pull Request Labeler"
on:
pull_request_target:
pull_request_review:
types: submitted
permissions:
contents: read
pull-requests: write
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: on new pull request
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.opened == true || github.event.pull_request.reopened == true }}
uses: actions/labeler@v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler_on_new_pr.yml
- name: on any pull request
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/labeler@v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
- name: on pull request approval
if: ${{ github.event_name == 'pull_request_review' && github.event.review.state == 'approved' }}
uses: actions/labeler@v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler_on_pr_approved.yml
- name: on pull request merged
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merged == true }}
uses: actions/labeler@v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler_on_pr_merged.yml