[!!!][TASK] Modernize toolchain onto actions/typescript-action template#2
Merged
Conversation
## The Issue
The action's toolchain was frozen at the state of the upstream fork
(GsActions/commit-message-checker) when it went unmaintained: Node 16,
ncc bundler, legacy ESLint config, CommonJS Jest, no local-action
support. The setup no longer matches the actions/typescript-action
template that GitHub maintains as the recommended baseline.
## How This PR Solves The Issue
- Bumps runtime to Node 24 (`.node-version`, `action.yml runs.using:
node24`, `nodejs_version: auto` in `.ddev/config.yaml`).
- Switches to ESM end-to-end (`package.json "type": "module"`, `.js`
import suffixes in TS, ts-jest ESM preset with
`--experimental-vm-modules`).
- Replaces ncc with Rollup (`rollup.config.ts`); `dist/index.js`
regenerated with a source map.
- Migrates ESLint to flat config (`eslint.config.mjs`); moves Prettier
config to YAML (`.prettierrc.yml`).
- Adopts `@github/local-action` for local dev (`local-action/.env.example`,
`local-action/event.json.example`).
- Consolidates Jest mocks into `__fixtures__/{core,github}.ts`; rewrites
tests around `jest.unstable_mockModule`.
- Marks `dist/` as `linguist-generated` in `.gitattributes` so GitHub
collapses the bundle diff.
- Adds a release workflow that auto-points the major-version tag
(`v3` to `v3.0.x`) on every published release.
- Adds `AGENTS.md` (canonical) with `CLAUDE.md` and
`.github/copilot-instructions.md` as symlinks so AI assistants share
the same project guidance.
- Updates `LICENSE` to carry both the original Gilbertsoft and the DDEV
Foundation copyright lines; preserves "forked from GsActions" credit
in `README.md` and every `src/*.ts` header.
- Fixes `action.yml` `accessToken` which previously defaulted to the
literal string `"false"`.
- Refreshes `.github/ISSUE_TEMPLATE/bug_report.yml` runner list (drops
retired Ubuntu 18.04/20.04, Windows 2016/2019, macOS 10.15/11; adds
current options and `Self-hosted`).
- Drops `.github/FUNDING.yml`, `CODE_OF_CONDUCT.md`, and
`.github/ISSUE_TEMPLATE/config.yml` (community resources now live
under the DDEV Foundation org).
## Manual Testing Instructions
- `ddev start && ddev npm install`
- `ddev npm run all` (format, lint, test, build) should be clean.
- `ddev npm run local-action` exercises `src/main.ts` against
`local-action/.env` and `local-action/event.json` (auto-copied from
the `.example` files on first run).
## Automated Testing Overview
- Existing Jest suite ported to ESM; covers regex pass/fail paths and
input/payload error conditions in
`__tests__/commit-message-checker.test.ts` and
`__tests__/input-helper.test.ts`.
- CI (`.github/workflows/test.yml`) installs, runs `npm run all`, and
fails the PR if `dist/` is dirty after a rebuild.
## Release/Deployment Notes
- Bumps the required Node runtime from 16 to 24. GitHub-hosted runners
have shipped Node 24 since 2025-09; consumers pinning via
`ddev/commit-message-checker@v3` need no workflow changes.
- The first release after this merge (e.g. `v3.0.0`) will trigger
`release.yml`, which creates the `v3` major-version tag and keeps it
current for subsequent patch releases.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Member
Author
|
v2.0.0 was never going to work, because we cannot publish it to Marketplace with the same name. This is going to be v3.0.0, and I'll test it in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
The action's toolchain was frozen at the state of the upstream fork (GsActions/commit-message-checker) when it went unmaintained: Node 16, ncc bundler, legacy ESLint config, CommonJS Jest, no local-action support. The setup no longer matches the actions/typescript-action template that GitHub maintains as the recommended baseline.
How This PR Solves The Issue
.node-version,action.yml runs.using: node24,nodejs_version: autoin.ddev/config.yaml).package.json "type": "module",.jsimport suffixes in TS, ts-jest ESM preset with--experimental-vm-modules).rollup.config.ts);dist/index.jsregenerated with a source map.eslint.config.mjs); moves Prettier config to YAML (.prettierrc.yml).@github/local-actionfor local dev (local-action/.env.example,local-action/event.json.example).__fixtures__/{core,github}.ts; rewrites tests aroundjest.unstable_mockModule.dist/aslinguist-generatedin.gitattributesso GitHub collapses the bundle diff.v3tov3.0.x) on every published release.AGENTS.md(canonical) withCLAUDE.mdand.github/copilot-instructions.mdas symlinks so AI assistants share the same project guidance.LICENSEto carry both the original Gilbertsoft and the DDEV Foundation copyright lines; preserves "forked from GsActions" credit inREADME.mdand everysrc/*.tsheader.action.ymlaccessTokenwhich previously defaulted to the literal string"false"..github/ISSUE_TEMPLATE/bug_report.ymlrunner list (drops retired Ubuntu 18.04/20.04, Windows 2016/2019, macOS 10.15/11; adds current options andSelf-hosted)..github/FUNDING.yml,CODE_OF_CONDUCT.md, and.github/ISSUE_TEMPLATE/config.yml(community resources now live under the DDEV Foundation org).Manual Testing Instructions
ddev start && ddev npm installddev npm run all(format, lint, test, build) should be clean.ddev npm run local-actionexercisessrc/main.tsagainstlocal-action/.envandlocal-action/event.json(auto-copied from the.examplefiles on first run).Automated Testing Overview
__tests__/commit-message-checker.test.tsand__tests__/input-helper.test.ts..github/workflows/test.yml) installs, runsnpm run all, and fails the PR ifdist/is dirty after a rebuild.Release/Deployment Notes
ddev/commit-message-checker@v3need no workflow changes.v3.0.0) will triggerrelease.yml, which creates thev3major-version tag and keeps it current for subsequent patch releases.