-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (32 loc) · 1.05 KB
/
review.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: Review PR with OpenAI GPT model
on:
issue_comment:
types: [created]
jobs:
pr_commented:
if: |
github.event.issue.pull_request &&
startsWith(github.event.comment.body, 'openai')
name: Review PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install
run: |
sudo apt-get update
python3 -m venv .env
source .env/bin/activate
python -m pip install -U pip
pip install -r requirements.txt
- name: Review PR and make comment
run: |
source .env/bin/activate
echo "LINK=https://github.com/${{ github.repository }}/pull/${{ github.event.issue.number }}" >> $GITHUB_ENV
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> $GITHUB_ENV
echo "GITHUB_TOKEN=${{ github.token }}" >> $GITHUB_ENV
echo "GITHUB_ACTOR=${{ github.actor }}" >> $GITHUB_ENV
python review.py