From 84d4f6b9a7707dbcdca80a83ec2a6fd79acd4f19 Mon Sep 17 00:00:00 2001 From: liuxiaotong Date: Sat, 7 Mar 2026 15:39:42 +0800 Subject: [PATCH] fix: auto-review task poll 403 by adding user_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提交 review 任务时传 user_id,轮询时带 user_id 查询参数, 解决无 owner 任务被 403 拒绝的问题。 Co-Authored-By: Claude Opus 4.6 --- .github/workflows/auto-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-review.yml b/.github/workflows/auto-review.yml index abac68a..fa69024 100644 --- a/.github/workflows/auto-review.yml +++ b/.github/workflows/auto-review.yml @@ -131,7 +131,7 @@ jobs: - summary: 审查总结 - comments: 具体意见数组(每条包含 file, line, comment)""" - print(json.dumps({'task': task, 'format': 'json'})) + print(json.dumps({'task': task, 'format': 'json', 'user_id': 'github-actions'})) PYEOF # 调用林锐审查(异步 API:POST 返回 task_id,轮询等结果) @@ -156,7 +156,7 @@ jobs: while [ $POLL_ELAPSED -lt $POLL_TIMEOUT ]; do sleep $POLL_INTERVAL POLL_ELAPSED=$((POLL_ELAPSED + POLL_INTERVAL)) - POLL_RESP=$(curl -s "https://crew.knowlyr.com/tasks/${TASK_ID}" \ + POLL_RESP=$(curl -s "https://crew.knowlyr.com/tasks/${TASK_ID}?user_id=github-actions" \ -H "Authorization: Bearer ${CREW_API_TOKEN}") STATUS=$(echo "$POLL_RESP" | python3 -c "import json,sys; print(json.load(sys.stdin).get('status','unknown'))" 2>/dev/null)