quivr/.github/workflows/code-review-gpt.yml

35 lines
735 B
YAML
Raw Normal View History

2023-07-10 18:43:45 +03:00
name: Code Review GPT
on:
pull_request:
branches: [main]
2023-07-10 19:18:34 +03:00
permissions:
pull-requests: write
2023-07-17 09:57:27 +03:00
contents: read
2023-07-10 19:18:34 +03:00
2023-07-10 18:43:45 +03:00
jobs:
build:
runs-on: ubuntu-latest
environment: preview
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install code-review-gpt
run: npm install code-review-gpt
- name: Run code review script
2023-07-17 09:57:27 +03:00
run: npx code-review-gpt review --ci
2023-07-10 18:43:45 +03:00
env:
2023-07-10 19:18:34 +03:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_SHA: ${{ github.sha }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}