更新 .gitea/workflows/test.yml
All checks were successful
Run Unit Tests / test (pull_request) Successful in 3s
All checks were successful
Run Unit Tests / test (pull_request) Successful in 3s
This commit is contained in:
parent
3622c20df2
commit
250dd1e327
@ -19,8 +19,15 @@ jobs:
|
||||
run: |
|
||||
# 提取 PR 编号(如 pull/14/head -> 14)
|
||||
PULLS_ID=$(git branch | grep -o 'pull/[0-9]\+' | cut -d'/' -f2)
|
||||
if [ -z "$PULLS_ID" ]; then
|
||||
echo "❌ 无法提取 PR 编号"
|
||||
exit 1
|
||||
fi
|
||||
echo "PR ID: $PULLS_ID"
|
||||
# 写入 GITHUB_ENV(可选,兼容旧脚本)
|
||||
echo "PULLS_ID=$PULLS_ID" >> $GITHUB_ENV
|
||||
# 写入 outputs,供后续步骤使用
|
||||
echo "pr_number=$PULLS_ID" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Run code review script
|
||||
env:
|
||||
@ -30,8 +37,8 @@ jobs:
|
||||
IGNORED_PATHS: '["EdgeManager/vendor/**", "mes_in_sct/vendor/**", "mes_in_task/vendor/**", "webman/public/**", "webman/runtime/**", "webman/vendor/**"]' # 忽略检测目录
|
||||
|
||||
# === Gitea API 配置(传给 audit_code.sh)===
|
||||
API_URL: "http://119.91.43.128:3003/api/v1/repos/hui/SCTMES_V5/issues/$PULLS_ID/comments"
|
||||
GITEA_TOKEN: $GITEA_TOKEN
|
||||
API_URL: "http://119.91.43.128:3003/api/v1/repos/hui/SCTMES_V5/issues/${{ steps.get_pr_number.outputs.pr_number }}/comments"
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
SYSTEM_PROMPT: |
|
||||
你是代码审核助手,我需要你审核代码后以JSON形式输出通过(passed)或者不通过(no-passed),只输出json不添加其他说明。
|
||||
|
Loading…
x
Reference in New Issue
Block a user