From cd7c850a16e61382ab3a3bf908f97427c63d0934 Mon Sep 17 00:00:00 2001 From: bbassie <17990055+bbassie@users.noreply.github.com> Date: Tue, 17 Nov 2026 12:09:53 +0000 Subject: [PATCH] Match the CI lint style in the changelog check Co-Authored-By: Claude Opus 5.5 --- scripts/check_pr_changelog.mts | 4 ++-- test/pr_changelog.js | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/check_pr_changelog.mts b/scripts/check_pr_changelog.mts index 83b460bb..1a6969bd 100644 --- a/scripts/check_pr_changelog.mts +++ b/scripts/check_pr_changelog.mts @@ -42,8 +42,8 @@ function main() { for (const problem of problems) { console.log(`::error title=Invalid changelog::${escapeAnnotation(problem)}`); } - const rules = `Valid sections are ${changelogSections.join(", ")}. ` - + "Each entry must reference an issue, or this pull request if there is no issue."; + const rules = `Valid sections are ${changelogSections.join(", ")}. ` + + "Each entry must reference an issue, or this pull request if there is no issue."; console.log(`\n${rules}`); console.log(`Expected format in the pull request description:\n\n${expectedFormat}`); if (summaryPath) { diff --git a/test/pr_changelog.js b/test/pr_changelog.js index aedf67a9..034bdab7 100644 --- a/test/pr_changelog.js +++ b/test/pr_changelog.js @@ -46,14 +46,16 @@ describe("scripts/check_pr_changelog", function() { const text = body("```", "- Orphan #1", "### Bugs", "- Fixed it", "Loose text", "```"); assert.deepEqual(findChangelogProblems(text), [ "Unexpected content \"- Orphan #1\" outside of a changelog section on line 1", - "Changelog section Bugs on line 2 is not one of " - + "Major Features, Features, Fixes, Changes, Breaking Changes, Meta", + "Changelog section Bugs on line 2 is not one of " + + "Major Features, Features, Fixes, Changes, Breaking Changes, Meta", "Changelog entry on line 3 does not reference an issue", "Unexpected content \"Loose text\" on line 4", ]); }); it("rejects the unedited template", function() { - const text = body("```", "### Features", "- Added doodad to web interface. #999", "", "### Changes", "- ...", "```"); + const text = body( + "```", "### Features", "- Added doodad to web interface. #999", "", "### Changes", "- ...", "```", + ); assert.deepEqual(findChangelogProblems(text), ["Changelog entry on line 5 does not reference an issue"]); }); });