Skip to content

Commit 18fc5ab

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

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# 2025-01-21 kurisaW Initial version
99
#
1010

11-
# Script Function Description: Assign PR reviews based on the MAINTAINERS list.asdasasassaasss
11+
# Script Function Description: Assign PR reviews based on the MAINTAINERS list.asdasasassaasasss
1212

1313
name: Auto Review Assistant
1414

@@ -176,6 +176,8 @@ jobs:
176176
177177
- name: Post/Update comment
178178
id: post_comment
179+
env:
180+
SUPER_SECRET: ${{ secrets.ACTION_TOKEN_AUTO_REVIEW1 }}
179181
run: |
180182
# 查找现有的 bot 评论
181183
existing_comment=$(curl -s \
@@ -199,8 +201,18 @@ jobs:
199201
-d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
200202
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments")
201203
fi
204+
echo "Creating new comment"
205+
response=$(curl -s -X POST \
206+
-H "Authorization: Bearer ${{ github.token }}" \
207+
-d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
208+
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments")
209+
echo "Creating new comment"
210+
response=$(curl -s -X POST \
211+
-H "Authorization: Bearer $SUPER_SECRET" \
212+
-d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
213+
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments")
202214
- name: Comment on PR
203215
uses: unsplash/comment-on-pr@master
204216
with:
205217
message: "欢迎提交PR!我们的团队将会尽快审查。"
206-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
218+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)