AI Code review action #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Review | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
env: # Or as an environment variable | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
code_review_job: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
name: Automated Code Review | |
continue-on-error: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Automated Code Review | |
uses: eepMoody/genai-code-review@main | |
with: | |
args: '/usr/local/bin/python /app/src/main.py' | |
openai_api_key: ${{ secrets.OPENAI_API_KEY }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
github_pr_id: ${{ github.event.number }} | |
openai_model: 'gpt-4o' # optional | |
openai_temperature: 0.5 # optional |