Skip to content

Commit d935990

Browse files
authored
Update auto-assign-reviewers.yml
1 parent 18fc5ab commit d935990

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/auto-assign-reviewers.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
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:

0 commit comments

Comments
 (0)