This repository was archived by the owner on Aug 13, 2024. It is now read-only.
File tree 1 file changed +13
-24
lines changed
1 file changed +13
-24
lines changed Original file line number Diff line number Diff line change 1
- on : [pull_request]
1
+ name : GPTReviewWorkflow
2
+
3
+ on :
4
+ pull_request :
5
+ types :
6
+ - opened
7
+ - synchronize
2
8
3
9
jobs :
4
- add_pr_comment :
5
- permissions : write-all
10
+ review_with_gpt :
6
11
runs-on : ubuntu-latest
7
- name : OpenAI PR Comment
12
+
8
13
steps :
9
- - uses : actions/checkout@v3
10
- with :
11
- ref : ${{ github.event.pull_request.head.sha }}
12
- fetch-depth : 2
13
- - id : patch
14
- run : |
15
- patch_output=$(curl --silent --request GET \
16
- --url https://api.github.com/repos/$PATCH_REPO/pulls/$PATCH_PR \
17
- --header "Accept: application/vnd.github.v3.patch" \
18
- --header "Authorization: Bearer $PATCH_GITHUB_TOKEN")
19
- echo $patch_output
20
- echo "GIT_PATCH_OUTPUT=$(echo $patch_output)" >> $GITHUB_ENV
21
- env :
22
- PATCH_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23
- PATCH_PR : ${{ github.event.pull_request.number }}
24
- PATCH_REPO : ${{ github.repository }}
25
- - id : review
26
- uses : MXCzkEVM/GPTReviewWorkflow@main
14
+ - name : GPTReviewWorkflow
15
+ uses : sheenhx/GPT4ReviewWorkflow@main
27
16
with :
28
17
GIT_COMMIT_HASH : ${{ github.event.pull_request.head.sha }}
29
- GIT_PATCH_OUTPUT : ${{ env.GIT_PATCH_OUTPUT }}
30
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
18
+ GIT_PATCH_OUTPUT : ${{ github.event.pull_request.patch_url }}
19
+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
31
20
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
32
21
OPENAI_ORG_KEY : ${{ secrets.OPENAI_ORG_KEY }}
33
22
PR_NUMBER : ${{ github.event.pull_request.number }}
You can’t perform that action at this time.
0 commit comments