From e470e059561927dd9f79830bbe31717ee70b7299 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 19 Jan 2026 16:07:53 +0100 Subject: [PATCH 1/2] tools: validate release commit diff as part of `lint-release-proposal` --- .github/workflows/lint-release-proposal.yml | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/lint-release-proposal.yml b/.github/workflows/lint-release-proposal.yml index dbd8232fa40280..5c36df0b22636d 100644 --- a/.github/workflows/lint-release-proposal.yml +++ b/.github/workflows/lint-release-proposal.yml @@ -26,6 +26,7 @@ jobs: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false + fetch-depth: 2 - name: Lint release commit title format run: | EXPECTED_TITLE='^[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}, Version [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ (\(Current|'.+' \(LTS)\)$' @@ -51,6 +52,28 @@ jobs: - name: Verify it's release-ready run: | SKIP_XZ=1 make release-only + - name: Lint release commit content + run: | + MAJOR="$(awk '/^#define NODE_MAJOR_VERSION / { print $3 }' src/node_version.h)" + + echo "Checking for expected files in the release commit:" + missing_expected= + for expected in CHANGELOG.md src/node_version.h doc/changelogs/; do + if git diff --exit-code --quiet --diff-filter=M HEAD^ -- "$expected"; then + echo "Missing expected file in diff: $expected" + missing_expected=1 + fi + done + [ -z "$missing_expected" ] || exit 1 + + echo "Checking for unexpected files in the release commit:" + set -ex + [ -z "$(git diff-tree --no-commit-id --name-only -r HEAD --\ + . \ + ':(exclude)CHANGELOG.md' \ + ':(exclude)src/node_version.h' \ + ':(exclude)doc/api/' \ + ":(exclude)doc/changelogs/CHANGELOG_V$MAJOR.md") ] - name: Validate CHANGELOG id: releaser-info run: | From 2fc6d8bf85b5ad1138c689420da68311540573e3 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 19 Jan 2026 18:31:02 +0100 Subject: [PATCH 2/2] Update .github/workflows/lint-release-proposal.yml --- .github/workflows/lint-release-proposal.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint-release-proposal.yml b/.github/workflows/lint-release-proposal.yml index 5c36df0b22636d..24e373d4be58e7 100644 --- a/.github/workflows/lint-release-proposal.yml +++ b/.github/workflows/lint-release-proposal.yml @@ -72,6 +72,7 @@ jobs: . \ ':(exclude)CHANGELOG.md' \ ':(exclude)src/node_version.h' \ + ':(exclude)test/parallel/test-process-release.js' \ ':(exclude)doc/api/' \ ":(exclude)doc/changelogs/CHANGELOG_V$MAJOR.md") ] - name: Validate CHANGELOG