-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 786 Bytes
/
Copy pathcode-review.yml
File metadata and controls
34 lines (28 loc) · 786 Bytes
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
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Install script dependencies
shell: bash
working-directory: ./.github/scripts
run: npm install
- name: Use chatgpt review script
shell: bash
working-directory: .github/scripts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
REPOSITORY: ${{ github.repository }}
PULL_NUMBER: ${{ github.event.number }}
run: node index.js