Merge pull request '更新 .gitea/workflows/test.yml' (#36) from james-patch-24 into main
Reviewed-on: #36
This commit is contained in:
commit
ac2e68cb8a
@ -19,8 +19,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# 提取 PR 编号(如 pull/14/head -> 14)
|
# 提取 PR 编号(如 pull/14/head -> 14)
|
||||||
PULLS_ID=$(git branch | grep -o 'pull/[0-9]\+' | cut -d'/' -f2)
|
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"
|
echo "PR ID: $PULLS_ID"
|
||||||
|
# 写入 GITHUB_ENV(可选,兼容旧脚本)
|
||||||
echo "PULLS_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
|
- name: Run code review script
|
||||||
env:
|
env:
|
||||||
@ -30,8 +37,8 @@ jobs:
|
|||||||
IGNORED_PATHS: '["EdgeManager/vendor/**", "mes_in_sct/vendor/**", "mes_in_task/vendor/**", "webman/public/**", "webman/runtime/**", "webman/vendor/**"]' # 忽略检测目录
|
IGNORED_PATHS: '["EdgeManager/vendor/**", "mes_in_sct/vendor/**", "mes_in_task/vendor/**", "webman/public/**", "webman/runtime/**", "webman/vendor/**"]' # 忽略检测目录
|
||||||
|
|
||||||
# === Gitea API 配置(传给 audit_code.sh)===
|
# === Gitea API 配置(传给 audit_code.sh)===
|
||||||
API_URL: "http://119.91.43.128:3003/api/v1/repos/hui/SCTMES_V5/issues/$PULLS_ID/comments"
|
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: $GITEA_TOKEN
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
SYSTEM_PROMPT: |
|
SYSTEM_PROMPT: |
|
||||||
你是代码审核助手,我需要你审核代码后以JSON形式输出通过(passed)或者不通过(no-passed),只输出json不添加其他说明。
|
你是代码审核助手,我需要你审核代码后以JSON形式输出通过(passed)或者不通过(no-passed),只输出json不添加其他说明。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user