generated from Pseudo-Lab/builder-template
-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (41 loc) ยท 1.2 KB
/
auto-label.yml
File metadata and controls
46 lines (41 loc) ยท 1.2 KB
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
name: Auto Label PR
on:
pull_request:
types: [opened, closed]
jobs:
# PR ์์ฑ ์ โ needs-review
add_label_on_open:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- name: Remove old status labels (safety)
uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
changes-requested
approved
merged
- name: Add 'needs-review' label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: needs-review
# PR ๋ณํฉ ์ โ merged
label_on_merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Remove previous labels
uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
needs-review
changes-requested
approved
- name: Add 'merged' label
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: merged