diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml index 2f9c76990d..a079cf1164 100644 --- a/.github/workflows/claude-review.yml +++ b/.github/workflows/claude-review.yml @@ -352,14 +352,17 @@ jobs: not available, git commands that failed, etc.), append a `### Errors` section to the summary listing each failed action and the error message. + ## Output formatting + + Do NOT escape characters in `body` or `summary`. Write plain markdown — no + backslash escaping of `!` or other characters. In particular, HTML comments + like `` must be written verbatim, never as `<\!-- ... -->`. + ## Review result Produce your review result as structured output. The fields are: - - `summary`: The markdown summary for the tracking comment, **base64-encoded**. - Write the summary to a temporary file first, then encode it with - `base64 -w0 /tmp/summary.md` and put the resulting string in this field. + - `summary`: The markdown summary for the tracking comment. - `comments`: Array of review comments (same schema as the reviewer output above). - The `body` field of each comment must also be **base64-encoded** the same way. - `resolve`: REST API IDs of review comment threads to resolve. PROMPT @@ -452,7 +455,7 @@ jobs: if (Array.isArray(review.resolve)) resolveIds = review.resolve; if (typeof review.summary === "string") - summary = Buffer.from(review.summary, "base64").toString("utf-8"); + summary = review.summary; } catch (e) { core.warning(`Failed to parse structured output: ${e.message}`); } @@ -483,7 +486,7 @@ jobs: ...(c.side != null && { side: c.side }), ...(c.start_line != null && { start_line: c.start_line }), ...(c.start_side != null && { start_side: c.start_side }), - body: `Claude: **${c.severity}**: ${Buffer.from(c.body, "base64").toString("utf-8")}`, + body: `Claude: **${c.severity}**: ${c.body}`, }); posted++; } catch (e) {