fix: preserve autoreview maintainer policy · openclaw/openclaw@3015eec
steipete
·
2026-05-18
·
via Recent Commits to openclaw:main
File tree
.agents/skills/autoreview/scripts
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,6 +59,7 @@ parallel_tests_auto=false
|
59 | 59 | dry_run=false |
60 | 60 | codex_review_prompt= |
61 | 61 | codex_review_stdin_prompt=false |
| 62 | +codex_review_prompt_file=false |
62 | 63 | openclaw_maintainer_validation=${AUTOREVIEW_OPENCLAW_MAINTAINER_VALIDATION:-${OPENCLAW_TESTBOX:-0}} |
63 | 64 | |
64 | 65 | while [[ $# -gt 0 ]]; do |
|
249 | 250 | if [[ "$review_kind" == local ]]; then |
250 | 251 | review_cmd+=(-) |
251 | 252 | codex_review_stdin_prompt=true |
| 253 | +else |
| 254 | + review_cmd=("$codex_bin" "${codex_args[@]}" review -) |
| 255 | + codex_review_prompt_file=true |
252 | 256 | fi |
253 | 257 | fi |
254 | 258 | |
@@ -272,7 +276,7 @@ if [[ "$reviewer" == auto || "$reviewer" == codex ]]; then
|
272 | 276 | printf 'review:' |
273 | 277 | printf ' %q' "${review_cmd[@]}" |
274 | 278 | printf '\n' |
275 | | -if [[ "$codex_review_stdin_prompt" == true ]]; then |
| 279 | +if [[ "$codex_review_stdin_prompt" == true || "$codex_review_prompt_file" == true ]]; then |
276 | 280 | printf 'review policy: OpenClaw maintainer Crabbox/Testbox-aware validation prompt injected\n' |
277 | 281 | fi |
278 | 282 | else |
@@ -323,7 +327,12 @@ trap cleanup EXIT
|
323 | 327 | |
324 | 328 | run_review() { |
325 | 329 | mkdir -p "$(dirname "$review_output")" |
326 | | -if [[ "$codex_review_stdin_prompt" == true ]]; then |
| 330 | +if [[ "$codex_review_prompt_file" == true ]]; then |
| 331 | + build_prompt_file || return |
| 332 | +"${review_cmd[@]}" < "$prompt_file" 2>&1 | tee "$review_output" |
| 333 | + rm -f "$prompt_file" |
| 334 | + prompt_file= |
| 335 | +elif [[ "$codex_review_stdin_prompt" == true ]]; then |
327 | 336 | printf '%s\n' "$codex_review_prompt" | "${review_cmd[@]}" 2>&1 | tee "$review_output" |
328 | 337 | else |
329 | 338 | "${review_cmd[@]}" 2>&1 | tee "$review_output" |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。