All contributions are welcome and greatly appreciated!
Check the
.node-versionfile in the repository root to see which Node.js version is required for local development. The JavaScript action runtime is declared separately inaction.yml. A version manager such as nodenv can use.node-versionautomatically.
- Fork this repository
- Commit your changes
- Test your changes (learn how to test below)
- Open a pull request back to this repository
For runtime source changes, run
npm run alland commit the regenerateddist/artifacts. Do not regeneratedist/for documentation-only changes. - Notify the maintainers of this repository for peer review and approval
- Merge!
The maintainers of this repository will create a new release with your changes so that everyone can use the new release and enjoy the awesome features of branch deployments.
For maintainers, see the Maintainer Guide for more information on how to create a new release.
This project requires every test to pass and 100% line, branch, and function coverage
The branch-deploy Action is used by enterprises, governments, and open source organizations - it is critical that we have 100% test coverage to ensure that we are not introducing any regressions. All changes will be throughly tested by maintainers of this repository before a new release is created.
Simply run the following command to execute the entire test suite:
npm run testRun the complete non-mutating formatting, typecheck, safety-policy, and test suite with:
npm run checkNote: these commands require that you have already run
npm ci --ignore-scripts --no-audit --no-fund
npm run test does not update the tracked coverage badge. The badge reflects the three enforced native Node coverage thresholds and the requirement that every test passes.
The suite uses node:test, native V8 coverage, and the exact Node version in .node-version. ESM module mocking and coverage are experimental test-only features pinned to that development runtime. npm run lint runs the repository's TypeScript compiler-API safety policy; formatting remains the responsibility of Prettier.
Runtime changes must be tested against a freshly rebuilt dist/index.js:
npm run package
npm run acceptanceThe native Node acceptance harness runs the committed action bundle through its real main/post lifecycle against a strict local GitHub API mock. It is the normal acceptance gate and is also available directly as script/acceptance when dist/index.js is already current.