Skip to content

Commit

Permalink
feat: add openai-pr-reviewer (#4424)
Browse files Browse the repository at this point in the history
* feat: add openai-pr-reviewer

Signed-off-by: Yukihito Saito <[email protected]>

* add OPENAI_API_ORG

Signed-off-by: Yukihito Saito <[email protected]>

* change openai_heavy_model

Signed-off-by: Yukihito Saito <[email protected]>

* remove OPENAI_API_ORG

Signed-off-by: Yukihito Saito <[email protected]>

* Change action name

Signed-off-by: Yukihito Saito <[email protected]>

---------

Signed-off-by: Yukihito Saito <[email protected]>
  • Loading branch information
yukkysaito authored Jul 27, 2023
1 parent 917ead5 commit 19dc46e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/openai-pr-reviewer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Code Review By ChatGPT

permissions:
contents: read
pull-requests: write

on:
pull_request:
pull_request_review_comment:
types: [created]

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref ||
github.sha }}-${{ github.workflow }}-${{ github.event_name ==
'pull_request_review_comment' && 'pr_comment' || 'pr' }}
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }}

jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: fluxninja/openai-pr-reviewer@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
debug: false
review_simple_changes: false
review_comment_lgtm: false
openai_light_model: gpt-3.5-turbo-0613
openai_heavy_model: gpt-3.5-turbo-0613 # The default is to use GPT4, which needs to be changed to join ChatGPT Plus.

0 comments on commit 19dc46e

Please sign in to comment.