Dashboardcraftci-poller body trailing newlines

ci-poller body trailing newlines

Category: gotcha
Confidence: 1.00
ID: 01a07eef-c8eb-75c7-bc58-6f05cbd6f300
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 0qdfyNMXGWQ5OTKCQ
Created: 2026-09-08 02:24:57
Updated: 2026-09-08 02:53:58

Content

Trap: decoding GitHub issue bodies into Bash variables or updated_body=$(...) looks lossless, but command substitution strips every trailing newline and jq -r adds one on output. Fix: write .body with jq -jr to a temporary file, pass PUBLISH_ISSUE_BODY_FILE to the resolver, write rewritten .issueBody with jq -jr, and call gh issue edit --body-file. This preserves every byte except the indexed canonical SHA replacement.

Move to: