Check the changelog section of pull request descriptions in CI

Ports the clusterio versions of the changelog scripts. pr_to_changelog.mts
gains the Contributors and Statistics blocks and a shared
checkPullRequestBody, which check_pr_changelog.mts runs on every pull
request through the new Changelog workflow. The latest release is now the
newest one targeting main. Adds the pull request template the check
expects, and node --test runs the script tests in Node.js CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-11-19 14:32:21 +00:00
1 parent b513b7a637
commit 3687a7a527
8 files changed
+305 -25

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
<!--
Describe why and what has been changed by this pull request, feel free to also ask for input on decisions you are unsure about etc.
The changelog lines below will be copied directly from merged pull requests to the changelog on new releases. Changes are expected to preferentially link to the associated issues. If there are no relevant issues, link to the pull request itself.
If there are no relevant changelog entries replace the code block below with "None." followed by an optional reason for why it is not needed.
-->
### Changelog
```
### Features
- Added doodad to web interface. #999
### Changes
- ...
### Fixes
- ...
### Breaking Changes
- ...
```
+30
View File
@@ -0,0 +1,30 @@
name: Changelog
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check:
# Bot pull requests do not fill in the template.
if: github.event.pull_request.user.type != 'Bot'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: scripts
- uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Check changelog in pull request description
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: node scripts/check_pr_changelog.mts
+2
View File
@@ -38,6 +38,8 @@ jobs:
run: pnpm install --no-frozen-lockfile
- name: Run tests
run: pnpm --filter "@expcluster/*" run test
- name: Run script tests
run: node --test test/*.test.js
- name: Run reference checks
run: |
# pnpm install runs prepare in dependency order, which hides missing