diff --git a/dist/index.js b/dist/index.js index 607119c..2e74238 100644 --- a/dist/index.js +++ b/dist/index.js @@ -45942,10 +45942,9 @@ async function format(bufPath, inputs) { if (result.status == Status.Failed && result.stdout.startsWith("diff")) { // If the format step fails, parse the diff and write github annotations. const diff = parse_diff(result.stdout); - result.stdout = ""; // Clear the stdout. - console.log("diff", diff); + result.stdout = ""; // Clear the stdout to count the number of changes. for (const file of diff) { - result.stdout += `::error file=${file.to}::Format failed -${file.deletions} +${file.additions} changes.\n`; + result.stdout += `::error file=${file.to},title=Buf format::Diff -${file.deletions}/+${file.additions}.\n`; } console.log(result.stdout); } diff --git a/src/main.ts b/src/main.ts index 4d81ede..f0811d1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -232,10 +232,9 @@ async function format(bufPath: string, inputs: Inputs): Promise { if (result.status == Status.Failed && result.stdout.startsWith("diff")) { // If the format step fails, parse the diff and write github annotations. const diff = parseDiff(result.stdout); - result.stdout = ""; // Clear the stdout. - console.log("diff", diff); + result.stdout = ""; // Clear the stdout to count the number of changes. for (const file of diff) { - result.stdout += `::error file=${file.to}::Format failed -${file.deletions} +${file.additions} changes.\n`; + result.stdout += `::error file=${file.to},title=Buf format::Diff -${file.deletions}/+${file.additions}.\n`; } console.log(result.stdout); }