diff --git a/src/entrypoints/post-buffered-inline-comments.ts b/src/entrypoints/post-buffered-inline-comments.ts index 763dae7..aa960a6 100644 --- a/src/entrypoints/post-buffered-inline-comments.ts +++ b/src/entrypoints/post-buffered-inline-comments.ts @@ -155,7 +155,14 @@ async function main() { const comments: BufferedComment[] = raw .split("\n") .filter(Boolean) - .map((line) => JSON.parse(line)); + .flatMap((line) => { + try { + return [JSON.parse(line) as BufferedComment]; + } catch { + console.log(`::warning::Skipping malformed JSONL line: ${line.slice(0, 120)}`); + return []; + } + }); if (comments.length === 0) { console.log("No buffered inline comments");