From 298ab0f62f4045bbf121908f9c2cfed639768418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LeoYuan=20=E8=A2=81=E5=8A=9B=E7=9A=93?= Date: Fri, 24 Mar 2023 09:24:21 +0800 Subject: [PATCH] feat: add code review job by chatgpt --- .github/workflows/pr comment by chatgpt.yml | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pr comment by chatgpt.yml diff --git a/.github/workflows/pr comment by chatgpt.yml b/.github/workflows/pr comment by chatgpt.yml new file mode 100644 index 000000000..52585c477 --- /dev/null +++ b/.github/workflows/pr comment by chatgpt.yml @@ -0,0 +1,23 @@ +name: Pull Request Review By ChatGPT + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + code-review: + name: Code Review + runs-on: ubuntu-latest + + steps: + # 判断用户是否有写仓库权限 + - name: 'Check User Permission' + uses: 'lannonbr/repo-permission-check-action@2.0.0' + with: + permission: 'write' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: opensumi/actions/.github/actions/code-review@main + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} \ No newline at end of file