Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/enhance-release-pr.mjs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Multi-line indentation fix not applied to server breaking changes in the 'Breaking changes' section

The PR adds newline indentation for server entries in the "Server changes" section (line 307), but serverBreaking entries are also rendered as list items in the "Breaking changes" section at line 264 without the same treatment.

Inconsistent handling of multi-line server entries

Server entries get their text from .server-changes/*.md file bodies (scripts/enhance-release-pr.mjs:185), which can contain newlines. The PR correctly indents continuation lines in the "Server changes" section:

const indented = entry.text.replace(/\n/g, "\n  ");
lines.push(`- ${indented}`);

However, at line 263-264, serverBreaking entries are rendered without this fix:

for (const entry of [...breaking, ...serverBreaking])
    lines.push(`- ${entry.text}`);

If a server breaking change has multi-line body text, the continuation lines will not be indented, breaking the markdown list formatting in the "Breaking changes" section. The text after the first newline would appear outside the list item.

Impact: Multi-line server breaking change entries will render with broken markdown formatting in the PR body.

(Refers to line 264)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ function formatPrBody({ version, packageEntries, serverEntries, rawBody }) {
"These changes affect the self-hosted Docker image and Trigger.dev Cloud:"
);
lines.push("");
for (const entry of allServer) lines.push(`- ${entry.text}`);
for (const entry of allServer) {
// Indent continuation lines so multi-line entries stay inside the list item
const indented = entry.text.replace(/\n/g, "\n ");
lines.push(`- ${indented}`);
}
lines.push("");
}

Expand Down