diff --git a/scripts/check_pr_changelog.mts b/scripts/check_pr_changelog.mts index 1a6969bd..2be8d812 100644 --- a/scripts/check_pr_changelog.mts +++ b/scripts/check_pr_changelog.mts @@ -15,7 +15,7 @@ const expectedFormat = [ "Or, when nothing user facing changed, replace the code block with:", "", "### Changelog", - "None. Only changes CI configuration.", + "None. Reason no change log is required.", ].join("\n"); /** Returns the problems found in the body, an empty list means it is valid. */ diff --git a/scripts/pr_to_changelog.mts b/scripts/pr_to_changelog.mts index 8b474779..4ded139b 100644 --- a/scripts/pr_to_changelog.mts +++ b/scripts/pr_to_changelog.mts @@ -79,7 +79,7 @@ function extractPullRequestChangelog( { const headerFail = skipToLine(parser, /^###? Changelog *$/); if (headerFail) { - return [failure, , "### Changelog header not found"]; + return [failure, , "\"### Changelog\" header not found"]; } parser.pos += 1; skipEmptyLines(parser); @@ -99,7 +99,7 @@ function extractPullRequestChangelog( } const lines = parser.lines.slice(blockStartPos, parser.pos); if (!lines.some(line => line.trim() !== "")) { - return [failure, , "Code block is empty, replace it with None. if nothing applies"]; + return [failure, , "Code block is empty, replace it with \"None.\" if nothing applies"]; } return [success, lines]; } diff --git a/test/pr_changelog.js b/test/pr_changelog.js index 034bdab7..9bad28be 100644 --- a/test/pr_changelog.js +++ b/test/pr_changelog.js @@ -30,11 +30,11 @@ describe("scripts/check_pr_changelog", function() { }); it("rejects a missing body or section", function() { assert.deepEqual(findChangelogProblems(null), ["Pull request has no body"]); - assert.deepEqual(findChangelogProblems("Description only."), ["### Changelog header not found"]); + assert.deepEqual(findChangelogProblems("Description only."), ["\"### Changelog\" header not found"]); assert.deepEqual(findChangelogProblems(body("Text")), ["Code block not found after header"]); assert.deepEqual(findChangelogProblems(body("```", "### Fixes")), ["End of code block not found after header"]); assert.deepEqual(findChangelogProblems(body("```", "", "```")), [ - "Code block is empty, replace it with None. if nothing applies", + "Code block is empty, replace it with \"None.\" if nothing applies", ]); }); it("rejects None. inside the code block", function() {