Skip to content

Commit ed0ebdf

Browse files
authored
Update auto-assign-reviewers.yml
1 parent dc64c8c commit ed0ebdf

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

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

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
issues: write
2727
pull-requests: write
2828
contents: write
29-
env:
30-
SUPER_SECRET: ${{ secrets.ACTION_TOKEN_AUTO_REVIEW }}
3129
steps:
3230
- name: Checkout code
3331
uses: actions/checkout@v3
@@ -161,28 +159,28 @@ jobs:
161159
echo "> ℹ️ **刷新CI状态操作需要具备仓库写入权限。**"
162160
echo "> ℹ️ **Refresh CI status operation requires repository Write permission.**"
163161
} > review_data.md
164-
- name: Post/Update comment
165-
id: post_comment
166-
run: |
167-
# 查找现有的 bot 评论
168-
existing_comment=$(curl -s \
169-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
170-
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" | \
171-
jq -r '.[] | select(.user.login == "github-actions[bot]") | {id: .id, body: .body} | @base64')
162+
# - name: Post/Update comment
163+
# id: post_comment
164+
# run: |
165+
# # 查找现有的 bot 评论
166+
# existing_comment=$(curl -s \
167+
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
168+
# "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" | \
169+
# jq -r '.[] | select(.user.login == "github-actions[bot]") | {id: .id, body: .body} | @base64')
172170

173-
if [[ -n "$existing_comment" ]]; then
174-
# 更新现有评论
175-
comment_id=$(echo "$existing_comment" | head -1 | base64 -d | jq -r .id)
176-
echo "Updating existing comment $comment_id"
177-
response=$(curl -s -X PATCH \
178-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
179-
-d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
180-
"https://api.github.com/repos/${{ github.repository }}/issues/comments/$comment_id")
181-
else
182-
# 创建新评论
183-
echo "Creating new comment"
184-
response=$(curl -s -X POST \
185-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
186-
-d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
187-
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments")
188-
fi
171+
# if [[ -n "$existing_comment" ]]; then
172+
# # 更新现有评论
173+
# comment_id=$(echo "$existing_comment" | head -1 | base64 -d | jq -r .id)
174+
# echo "Updating existing comment $comment_id"
175+
# response=$(curl -s -X PATCH \
176+
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
177+
# -d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
178+
# "https://api.github.com/repos/${{ github.repository }}/issues/comments/$comment_id")
179+
# else
180+
# # 创建新评论
181+
# echo "Creating new comment"
182+
# response=$(curl -s -X POST \
183+
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
184+
# -d "$(jq -n --arg body "$(cat review_data.md)" '{body: $body}')" \
185+
# "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments")
186+
# fi

0 commit comments

Comments
 (0)