Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6dc2a99

Browse filesBrowse files
aduh95marco-ippolito
authored andcommitted
tools: validate release commit diff as part of lint-release-proposal
PR-URL: #61440 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
1 parent f660560 commit 6dc2a99
Copy full SHA for 6dc2a99

1 file changed

+24Lines changed: 24 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/lint-release-proposal.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/lint-release-proposal.yml
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
with:
2828
persist-credentials: false
29+
fetch-depth: 2
2930
- name: Lint release commit title format
3031
run: |
3132
EXPECTED_TITLE='^[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}, Version [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ (\(Current|'.+' \(LTS)\)$'
@@ -51,6 +52,29 @@ jobs:
5152
- name: Verify it's release-ready
5253
run: |
5354
SKIP_XZ=1 make release-only
55+
- name: Lint release commit content
56+
run: |
57+
MAJOR="$(awk '/^#define NODE_MAJOR_VERSION / { print $3 }' src/node_version.h)"
58+
59+
echo "Checking for expected files in the release commit:"
60+
missing_expected=
61+
for expected in CHANGELOG.md src/node_version.h doc/changelogs/; do
62+
if git diff --exit-code --quiet --diff-filter=M HEAD^ -- "$expected"; then
63+
echo "Missing expected file in diff: $expected"
64+
missing_expected=1
65+
fi
66+
done
67+
[ -z "$missing_expected" ] || exit 1
68+
69+
echo "Checking for unexpected files in the release commit:"
70+
set -ex
71+
[ -z "$(git diff-tree --no-commit-id --name-only -r HEAD --\
72+
. \
73+
':(exclude)CHANGELOG.md' \
74+
':(exclude)src/node_version.h' \
75+
':(exclude)test/parallel/test-process-release.js' \
76+
':(exclude)doc/api/' \
77+
":(exclude)doc/changelogs/CHANGELOG_V$MAJOR.md")" ]
5478
- name: Validate CHANGELOG
5579
id: releaser-info
5680
run: |

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.