-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) ยท 1.55 KB
/
request-changes.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
#๋ฆฌ๋ทฐ ๊ณผ์ ์์ ๋ฐ๋ ค๋ ๊ฒฝ์ฐ ๋ผ๋ฒจ์ "์์ ์์ฒญ"์ผ๋ก ๋ณ๊ฒฝํ๊ณ ์์
์์๊ฒ ์๋ฆผ ๋ณด๋ด๊ธฐ
name: 'Handle Requested Changes'
on:
pull_request_review:
types: [ submitted ]
jobs:
request_changes:
runs-on: ubuntu-latest
steps:
- name: 'Check if Changes Requested'
id: check
uses: actions/github-script@v6
with:
script: |
return context.payload.review.state === 'CHANGES_REQUESTED';
- name: 'Change Label to ์์ ์์ฒญ'
if: steps.check.outputs.result == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: '์์ ์์ฒญ'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Remove Label ํ์ธ ์์ฒญ'
if: steps.check.outputs.result == 'true'
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: 'ํ์ธ ์์ฒญ'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Notify Assignee via Comment'
if: steps.check.outputs.result == 'true'
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
const assignee = context.payload.pull_request.user.login;
const body = `@${assignee} ๋ฆฌ๋ทฐ์์ ์์ ์์ฒญ์ด ์์ต๋๋ค. ํ์ธ ๋ถํ๋๋ฆฝ๋๋ค.`;
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: body,
});