Skip to content

Commit c3e11a8

Browse files
committed
update
1 parent c3c207e commit c3e11a8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/trigger-n8n-workflow.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,18 @@ jobs:
430430
def truncate(text: str) -> str:
431431
return text[:limit] + ("..." if len(text) > limit else "")
432432
433+
def emit(text: str) -> None:
434+
stripped = text.strip()
435+
if not stripped:
436+
print("(response empty or fully redacted)")
437+
else:
438+
print(stripped)
439+
433440
try:
434441
data = json.loads(raw)
435442
except json.JSONDecodeError:
436443
cleaned = ''.join(ch if ch.isprintable() else '?' for ch in raw)
437-
print(truncate(cleaned.replace("\n", " ")))
444+
emit(truncate(cleaned.replace("\n", " ")))
438445
sys.exit(0)
439446
440447
def scrub(value):
@@ -448,7 +455,7 @@ jobs:
448455
return value
449456
450457
sanitized = json.dumps(scrub(data), ensure_ascii=False)
451-
print(truncate(sanitized.replace("\n", " ")))
458+
emit(truncate(sanitized.replace("\n", " ")))
452459
PY
453460
454461
echo "error=true" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)