Skip to content

Handle Requested Changes #35

Handle Requested Changes

Handle Requested Changes #35

Workflow file for this run

#๋ฆฌ๋ทฐ ๊ณผ์ •์—์„œ ๋ฐ˜๋ ค๋  ๊ฒฝ์šฐ ๋ผ๋ฒจ์„ "์ˆ˜์ • ์š”์ฒญ"์œผ๋กœ ๋ณ€๊ฒฝํ•˜๊ณ  ์ž‘์—…์ž์—๊ฒŒ ์•Œ๋ฆผ ๋ณด๋‚ด๊ธฐ
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,
});