Files
VariableVince 8e6c0c1132 Chore:Deprecation of Node 20: migrate actions in workflows to Node 24 versions (#3460)
## Description:

Node 20 will reach EOL in April 2026. Node.js 20 actions are deprecated
and will be forced to run on Node.js 24 starting June 2, 2026:
https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Update our workflows in this PR.

- For _deployment-action_ and _deployment-status_: stop using these and
. They seem quite unmaintained which could pose risks and there is no
Node 24 version yet:
https://github.com/chrnorm/deployment-action/issues/93 and
https://github.com/chrnorm/deployment-status/issues/53. It will probably
be updated to Node 24, but why wait if we don't actually need to be
dependent on them per se.

- Instead of the above, use actions/github-script@v8 with default API.
Maybe a bit more maintainance work, if any, but better than to be
dependent on unmaintained outside actions. For reference see
https://docs.github.com/en/rest/deployments/deployments?apiVersion=2026-03-10#create-a-deployment

- For _auto-author-assign_, use v3.0.1
(4d585cc37690897bd9015942ed6e766aa7cdb97f). From v3.0.0 it uses Node 24:
https://github.com/toshimaru/auto-author-assign/releases

- For _stale_, use v10.2.0 (b5d41d4e1d5dceea10e7104786b73624c18a190f).
From v10.0.0 it uses Node 24: https://github.com/actions/stale/releases

- For other actions, use their appropriate version for Node 24.

- Tested all with FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
2026-03-19 21:32:32 -07:00

83 lines
2.6 KiB
YAML

name: 🧼 PR
on:
merge_group:
types:
- checks_requested
pull_request:
types:
- demilestoned
- edited
- milestoned
- opened
- synchronize
permissions: {}
jobs:
validate-description:
name: Validate Description
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/github-script@v8
with:
script: |
if (context.eventName === 'merge_group') {
// Ignore merge_group events
return;
}
const body = context.payload.pull_request.body || '';
const errors = [];
// Check for ## Description section
const descMatch = body.match(/^## Description:\s*\n([\s\S]*?)(?:^## |\Z)/m);
if (!descMatch || descMatch[1].trim().length < 20) {
errors.push('❌ Missing or short `## Description:` section.');
}
// Check all five boxes are checked
const requiredBoxes = [
/- \[x\] I have added screenshots for all UI updates/i,
/- \[x\] I process any text displayed to the user through translateText\(\) and I\'ve added it to the en\.json file/i,
/- \[x\] I have added relevant tests to the test directory/i,
/- \[x\] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced/i,
];
for (const box of requiredBoxes) {
if (!box.test(body)) {
errors.push('❌ One or more checklist items are not checked.');
break;
}
}
if (errors.length > 0) {
core.setFailed(errors.join('\n'));
} else {
console.log('✅ PR description and checklist look good.');
}
has-milestone:
name: Has Milestone
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/github-script@v8
with:
script: |
if (context.eventName === 'merge_group') {
// Ignore merge_group events
} else if (context.eventName === 'pull_request') {
// Get the pull request data
const milestone = context.payload.pull_request.milestone;
if (!milestone) {
core.setFailed('❌ Reviewer must assign a Milestone to this Pull request before merging.');
return;
}
console.log(`✅ Milestone found: ${milestone.title}`);
} else {
core.setFailed(`❌ Unknown event type ${context.eventName}.`);
}