ci: Drop base64 encoding in claude review workflow

Doesn't seem to work nearly as good as the previous solution which
just told claude not to escape stuff.
This commit is contained in:
Daan De Meyer
2026-04-02 21:45:11 +02:00
committed by Daan De Meyer
parent 1f6935145d
commit 0508f15b7f
+9 -6
View File
@@ -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) {