From 8373b612188db99c04e5a6afa4689ceec0f2c476 Mon Sep 17 00:00:00 2001 From: Joris Neuteboom Date: Thu, 15 Oct 2026 12:17:22 +0200 Subject: [PATCH] ci: require a changelog entry for changes that ship Prepare release turns ## Unreleased into the release notes, so a change under packages/ without an entry is missing from them. A new Changelog entry job fails such a PR; the skip-changelog label bypasses it, release/v* branches are exempt, and dependabot's npm and Actions updates get the label automatically. Each package's own test/ and README.md don't count as shipped; templates' test/ and .md files do. --- .github/dependabot.yml | 7 ++- .github/pull_request_template.md | 13 +++++ .github/rulesets/require-ci-to-pass.json | 1 + .github/workflows/ci.yml | 23 ++++++++ CONTRIBUTING.md | 12 ++++ docs/repository-settings.md | 5 ++ package.json | 1 + scripts/changelog-check.mjs | 73 ++++++++++++++++++++++++ scripts/test/changelog-check.test.ts | 35 ++++++++++++ 9 files changed, 168 insertions(+), 2 deletions(-) create mode 100644 scripts/changelog-check.mjs create mode 100644 scripts/test/changelog-check.test.ts diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3d69405e..bdf01e82 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,6 +17,8 @@ updates: - "@types/*" commit-message: prefix: "chore(deps)" + # Tooling updates are listed under the release's Commits; they need no hand-written entry. + labels: ["dependencies", "javascript", "skip-changelog"] - package-ecosystem: github-actions directory: / @@ -24,9 +26,10 @@ updates: interval: monthly commit-message: prefix: "ci" + labels: ["dependencies", "github_actions", "skip-changelog"] - # The digest-pinned base image the scaffold emits. These PRs fail the bump check - # until `shared:docker`'s version in src/features/docker.ts is bumped by hand. + # The digest-pinned base image the scaffold emits. These PRs fail the bump and changelog checks + # until `shared:docker`'s version in src/features/docker.ts is bumped and an entry added by hand. - package-ecosystem: docker directory: /packages/preset-nuxt4/templates/docker schedule: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c829e3e7..6d38cb13 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -59,6 +59,19 @@ existing project, which is the most confusing possible outcome. CI gates this, so an unbumped feature fails the run before anything else. +## Changelog + +Skip this section if nothing under `packages/` changes, other than a package's own +`test/` or `README.md`. + +Prepare release turns `## Unreleased` in `CHANGELOG.md` into the release notes, +so an entry missing there is missing from the release. + +- [ ] I added a line under `## Unreleased` saying what changes for someone using battlestack +- [ ] Not applicable + +CI gates this. For a change with nothing to tell users, add the `skip-changelog` label and say why here. + ## Testing