diff --git a/tools/prepare-release.js b/tools/prepare-release.js index 609b11fe819c..ee144577a36e 100644 --- a/tools/prepare-release.js +++ b/tools/prepare-release.js @@ -153,7 +153,7 @@ async function prepareRelease(type) { console.log(); console.log("Compute diff between package and repo contents"); - const diff = computeDiff(type); + let diff = computeDiff(type); console.log(`- Diff length: ${diff?.length}`); if (!diff) { if (pendingPR) { @@ -168,6 +168,19 @@ async function prepareRelease(type) { console.log("- No diff found, return"); return; } + if (diff.length > 60000) { + console.log("- Diff is too long, dump it to the console and truncate"); + console.log(); + console.log("----- DIFF BEGINS -----") + console.log(diff); + console.log("----- DIFF ENDS -----") + diff = `IMPORTANT: +- Diff is too long to render in a PR description: ${diff.length} characters +- First 60000 characters shown below +- Check the action log for the full diff + +${diff.substring(0, 60000)}`; + } console.log(); console.log("Extract and bump version number");