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

+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