From be4b54e4d1aa84a7a1ac2fa0a2c71c23f8b931a2 Mon Sep 17 00:00:00 2001 From: Sergey Matyunin Date: Sun, 13 Sep 2026 14:45:17 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BA=D0=BE=D1=80=D1=80?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=BD=D1=8B=D0=B9=20output=20=D0=B8=D0=BD?= =?UTF-8?q?=D1=82=D0=B5=D0=B3=D1=80=D0=B0=D1=86=D0=B8=D0=B8=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B2=D1=8C=D1=8E=20(#551)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workflow сохраняет объект вердикта и отделяет delimiter GitHub output завершающим LF. Issue: #551 User-Visible: no --- .github/workflows/process.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 37f550cc..ddb522a8 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -1082,10 +1082,11 @@ jobs: legacy="docs/reviews/${marker}-${NUM}-r${CYCLE}.md" if [ ! -f "$SOURCE" ] && [ -f "$legacy" ]; then cp "$legacy" "$SOURCE"; fi test -s "$SOURCE" || { echo "::error::модель не оставила документ ревью"; exit 1; } - printf '%s' "$OUT" | jq -e ' + printf '%s' "$OUT" > "$RUNNER_TEMP/verdict.json" + jq -e ' (.verdict == "green" or .verdict == "yellow" or .verdict == "red") and (.high | type == "number") and (.medium | type == "number") - and (.summary | type == "string")' > "$RUNNER_TEMP/verdict.json" + and (.summary | type == "string")' "$RUNNER_TEMP/verdict.json" >/dev/null dir="$RUNNER_TEMP/review-result" mkdir -p "$dir" cp "$RUNNER_TEMP/review-prepared/prepared.json" "$dir/prepared.json" @@ -1211,11 +1212,11 @@ jobs: (.verdict == "green" or .verdict == "yellow" or .verdict == "red") and (.high | type == "number") and (.medium | type == "number") and (.summary | type == "string")' "$dir/verdict.json" >/dev/null - { - echo 'structured_output<> "$GITHUB_OUTPUT" + printf 'structured_output<> "$GITHUB_OUTPUT" + cat "$dir/verdict.json" >> "$GITHUB_OUTPUT" + # structured_output не обязан оканчиваться LF: delimiter команды + # GitHub должен начинаться с отдельной строки. + printf '\nEOF_RESULT\n' >> "$GITHUB_OUTPUT" # Ревьюер пишет только в docs/reviews/. Что именно попадёт в коммит, # решает этот шаг, а не модель: всё остальное откатывается.