Skip to content

Code Review GPT

Code Review GPT #46

Workflow file for this run

name: Code Review GPT
on:
pull_request_review_comment:
jobs:
run_code_review:
runs-on: ubuntu-latest
if: ${{ contains('\gpt,/gpt', github.event.comment.body) }}
steps:
- name: Check if allowed user and command
id: check_if_run
run: |
if [[ "${{ secrets.GPT_ALLOWED_USERS }}" == *"${{ github.event.pull_request.user.login }}"* ]]; then
echo "run_code_review=true" >> $GITHUB_ENV
else
echo "run_code_review=false" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Code Review GPT
uses: mattzcarey/[email protected]
with:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
MODEL: 'gpt-4o'
GITHUB_TOKEN: ${{ github.token }}