Contribution workflow
Create a topic branch
Branch from Keep unrelated changes out of the same branch.
main. Use a name that reflects the change:Install dependencies
pre-commit hook, which runs staged-file linting and formatting automatically before each commit.Run local verification
Run all checks before pushing. CI runs the same suite; local failures will block CI.All four commands must pass before opening a PR.
Commit your changes
Use Conventional Commit prefixes. These drive automatic versioning via semantic-release.For breaking changes, append
! to the type or include a BREAKING CHANGE: footer:Open a pull request
Push your branch and open a PR against
main. The PR title must follow the same Conventional Commit format as commits (enforced by the semantic-pr-title workflow).Your PR should include:- A clear problem statement and implementation summary.
- Test evidence: paste the output of
npm run lint,npm run typecheck,npm run test, andnpm run build. - Updated documentation for any user-visible changes.
Commit conventions
CodeGate uses semantic-release for automated versioning and changelog generation. Commit types map directly to version bumps:| Commit type | Version bump | Examples |
|---|---|---|
feat | Minor (0.x.0) | New command, new flag, new output format |
fix | Patch (0.0.x) | Bug fix, incorrect behavior correction |
docs | Patch | Documentation updates |
refactor | Patch | Code restructuring without behavior change |
perf | Patch | Performance improvements |
test | Patch | Test additions or updates |
build | Patch | Build system changes |
ci | Patch | CI configuration changes |
style | Patch | Code style or formatting |
chore | Patch | Maintenance tasks |
revert | Patch | Reverts a previous commit |
feat! or BREAKING CHANGE | Major (x.0.0) | Backwards-incompatible changes |
PR title requirements
Thesemantic-pr-title workflow validates every PR title against the Conventional Commit format. A PR with an invalid title cannot be merged.
Valid PR title format:
feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
Examples:
Pull request checklist
Before marking your PR ready for review:- Tests added or updated for any behavior changes.
- Documentation updated for any user-visible changes.
- CI is green across all matrix entries (Ubuntu, macOS, Windows; Node 20, 22, 24).
- No unrelated changes included in the PR.
- PR title follows Conventional Commit format.
Reporting security issues
Do not open public issues for vulnerabilities. See Vulnerability disclosure and follow the private disclosure process.Code of conduct
This project is committed to a respectful, harassment-free community. Expected behavior:- Use welcoming and inclusive language.
- Be respectful of differing viewpoints and experiences.
- Accept constructive feedback gracefully.
- Focus on what is best for the community.
- Harassment, intimidation, or discrimination.
- Trolling, insulting, or derogatory comments.
- Publishing others’ private information without permission.
- Any conduct that is inappropriate in a professional setting.
SUPPORT.md.