-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (29 loc) · 1 KB
/
cr.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
name: Code Review
permissions:
contents: read
pull-requests: write
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
code_review:
runs-on: self-hosted
steps:
- uses: anc95/ChatGPT-CodeReview@main
env:
MODEL: gpt-3.5-turbo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ env.OPENAI_API_KEY }}
LANGUAGE: Korean
- name: Send Notification
if: ${{ always() }}
run: |
if [[ ${{ job.status }} == "success" ]]; then
MESSAGE="✅ ${{ job.status }} 백엔드 OpenAI 코드 리뷰 성공: batch-service - by ${{ github.actor }}"
else
MESSAGE="❌ ${{ job.status }} 백엔드 OpenAI 코드 리뷰 실패: batch-service - by ${{ github.actor }}"
fi
curl -X POST -H "Content-Type: application/json" --data "{\"text\":\"${MESSAGE}\"}" ${{ env.WEBHOOK_URL }}