diff --git a/packages/release-tooling/src/release-notes/comment.ts b/packages/release-tooling/src/release-notes/comment.ts index fd1e175e7f..5baf9f6842 100644 --- a/packages/release-tooling/src/release-notes/comment.ts +++ b/packages/release-tooling/src/release-notes/comment.ts @@ -79,20 +79,24 @@ export function wrapReleaseNotesComment( : []), `# Release preview: v${version}`, "", + "---", + "", bodyStartMarker, "", notes, "", bodyEndMarker, "", - "Maintainers may edit the release notes above. Keep the hidden markers intact.", + "---", + "", ...(merged ? [ - "This PR is already merged. Re-run the original failed Release workflow after reviewing these notes.", + "> [!IMPORTANT]", + "> **For maintainers:** This PR is already merged. Review and edit the notes above without changing the hidden markers. Re-run the original failed Release workflow when they are ready.", ] : [ - "Any head update returns this PR to Draft. Rerun `/release-notes` after it changes.", - "The release bot marks this PR ready. Merging it approves these release notes.", + "> [!TIP]", + "> **For maintainers:** You can edit the notes above, but keep the hidden markers intact. If the head changes, this PR returns to Draft. Rerun `/release-notes` after any update. Merging this PR approves the preview.", ]), ].join("\n"); } diff --git a/packages/release-tooling/test/release-notes-comment.test.ts b/packages/release-tooling/test/release-notes-comment.test.ts index 76f4330677..5655b1b0cb 100644 --- a/packages/release-tooling/test/release-notes-comment.test.ts +++ b/packages/release-tooling/test/release-notes-comment.test.ts @@ -20,6 +20,10 @@ describe("wrapReleaseNotesComment", () => { expect(comment).toContain(""); expect(comment).toContain(notes); expect(comment).toContain(""); + expect(comment).toContain( + `# Release preview: v${version}\n\n---\n\n`, + ); + expect(comment).toContain("\n\n---\n\n> [!TIP]"); }); it("rejects empty release notes", () => { @@ -65,14 +69,17 @@ describe("wrapReleaseNotesComment", () => { expect(comment).toContain("This PR is already merged"); expect(comment).toContain("Re-run the original failed Release workflow"); - expect(comment).not.toContain("marks this PR ready"); + expect(comment).toContain("> [!IMPORTANT]"); + expect(comment).not.toContain("> [!TIP]"); }); it("explains the draft approval lifecycle", () => { const comment = wrapReleaseNotesComment(version, head, notes); - expect(comment).toContain("Any head update returns this PR to Draft"); - expect(comment).toContain("The release bot marks this PR ready"); + expect(comment).toContain("> [!TIP]"); + expect(comment).toContain("keep the hidden markers intact"); + expect(comment).toContain("this PR returns to Draft"); + expect(comment).toContain("Merging this PR approves the preview"); }); it("rejects malformed release identity markers", () => {