Skip to content

Commit

Permalink
add chatgpt code review (#3824)
Browse files Browse the repository at this point in the history
* add chatgpt code review

* add chatgpt code review

* add chatgpt code review

---------

Co-authored-by: xianhuawei <xianhuawei@macair2018.local>
  • Loading branch information
xianhuawei and xianhuawei authored Mar 24, 2023
1 parent ac75f13 commit 237b5a2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/chatgpt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ChatGPT Code Review

on:
pull_request:
types: [opened, reopened,synchronize]
workflow_dispatch:

permissions:
contents: read
pull-requests: read

jobs:
CodeReview:
name: ChatGPT Code Review
runs-on: ubuntu-latest
steps:
- name: OpenAI ChatGPT Code Review
uses: cirolini/chatgpt-github-actions@v1.3
with:
openai_api_key: ${{ secrets.OPENAI_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_pr_id: ${{ github.event.number }}
# openai_engine: "gpt-4" #optional
# openai_temperature: 0.5 #optional
# openai_max_tokens: 8192 #optional
mode: file # file or patch
12 changes: 0 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ env:
GO111MODULE: on

jobs:
# CodeView:
# name: Code Review - chatgpt
# runs-on: self-hosted
# steps:
# - name: OpenAI ChatGPT Code Review
# uses: adshao/chatgpt-code-review-action@v0.2.5
# with:
# PROGRAMMING_LANGUAGE: 'Go'
# REVIEW_COMMENT_PREFIX: 'chatgpt:'
# FULL_REVIEW_COMMENT: 'chatgpt'
# OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ci:
name: ci flow
runs-on: self-hosted
Expand Down

0 comments on commit 237b5a2

Please sign in to comment.