From f60f4d950069b26d3b0a9b09036de175a9410dc2 Mon Sep 17 00:00:00 2001 From: Mario Campos Date: Mon, 31 Aug 2026 11:38:54 -0500 Subject: [PATCH] Validate change-notes in PRs This commit also introduces the 'empty' home directory for future change-notes. --- .github/workflows/pr-checks.yml | 4 ++++ pr-checks/config.ts | 3 +++ unreleased-change-notes/.gitkeep | 0 3 files changed, 7 insertions(+) create mode 100644 unreleased-change-notes/.gitkeep diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index ed514c9cd..c752c5dc7 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -114,6 +114,10 @@ jobs: working-directory: pr-checks run: npx tsx --test + - name: Run `pr-checks/changenotes.mts` to ensure that all unreleased change notes are valid + if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }} + run: npx tsx pr-checks/changenotes.mts validate + - name: Verify all Actions use the same Node version id: head-version run: | diff --git a/pr-checks/config.ts b/pr-checks/config.ts index 356fe665f..05bcbfe3c 100644 --- a/pr-checks/config.ts +++ b/pr-checks/config.ts @@ -18,6 +18,9 @@ export const PACKAGE_JSON = path.join(REPO_ROOT, "package.json"); /** The path of the changelog. */ export const CHANGELOG_FILE = path.join(REPO_ROOT, "CHANGELOG.md"); +/** The path to the unreleased change-notes directory. */ +export const CHANGENOTES_DIR = path.join(REPO_ROOT, "unreleased-change-notes"); + /** The path to the esbuild metadata file. */ export const BUNDLE_METADATA_FILE = path.join(REPO_ROOT, "meta.json"); diff --git a/unreleased-change-notes/.gitkeep b/unreleased-change-notes/.gitkeep new file mode 100644 index 000000000..e69de29bb