Skip to content

Commit

Permalink
AI Code review action (#497)
Browse files Browse the repository at this point in the history
* create code review action without custom prompt for testing purposes

* remove API key from env section

unsure if this will actually work

* create an error to test functionality

* fix the error
  • Loading branch information
eepMoody authored Aug 25, 2024
1 parent f907109 commit 448ac8f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Code Review

permissions:
contents: read
issues: write
pull-requests: write

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 # allows test to pass even if no issues are found
steps:
- name: Checkout code
uses: actions/checkout@v3

- 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' # most cost effective model at this time
openai_temperature: 0.5 # best balance between quality and cost

0 comments on commit 448ac8f

Please sign in to comment.