File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2727 pull-requests : write
2828 contents : write
2929 discussions : write
30+ env :
31+ SUPER_SECRET : ${{ secrets.ACTION_TOKEN_AUTO_REVIEW1 }}
3032 steps :
3133 - name : Checkout code
3234 uses : actions/checkout@v3
@@ -176,8 +178,6 @@ jobs:
176178
177179 - name : Post/Update comment
178180 id : post_comment
179- env :
180- SUPER_SECRET : ${{ secrets.ACTION_TOKEN_AUTO_REVIEW1 }}
181181 run : |
182182 # 查找现有的 bot 评论
183183 existing_comment=$(curl -s \
@@ -211,6 +211,11 @@ jobs:
211211 -H "Authorization: Bearer $SUPER_SECRET" \
212212 -d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
213213 "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments")
214+ echo "Creating new comment"
215+ response=$(curl -s -X POST \
216+ -H "Authorization: Bearer ${{ secrets.TOKEN }}" \
217+ -d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
218+ "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments")
214219 - name : Comment on PR
215220 uses : unsplash/comment-on-pr@master
216221 with :
You can’t perform that action at this time.
0 commit comments