Browse Source

Add '.github/workflows/chatgpt-action.yml'

天问 2 years ago
parent
commit
d8f8cd6a8d
1 changed files with 18 additions and 0 deletions
  1. 18 0
      .github/workflows/chatgpt-action.yml

+ 18 - 0
.github/workflows/chatgpt-action.yml

@@ -0,0 +1,18 @@
+name: ChatGPT CodeReview
+
+on: [pull_request]
+
+jobs:
+  chatgpt_comment:
+    runs-on: ubuntu-latest
+    name: Let chatgpt comment on your PR.
+    steps:
+      - name: ChatGPT comment
+        uses: kxxt/chatgpt-action@v0.2
+        id: chatgpt
+        with:
+          number: ${{ github.event.pull_request.number }}
+          sessionToken: ${{ secrets.CHATGPT_SESSION_TOKEN }}
+          split: 'yolo'  # Use true to enable the unstable split feature.
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}