Contributing via Pull Requests

Found an error? Have a suggestion?Edit this page on GitHub

Contributing via Pull Requests

Getting Started

  1. Open an issue first (unless it's a trivial fix)
  2. Set up environment — Follow DEVELOPMENT.md
  3. Create a branch — Use prefixes: feat/, fix/, docs/, refactor/, test/, chore/

PR Title Format

Follow Conventional Commits:

TypeDescriptionRelease
feat:New featureMINOR
fix:Bug fixPATCH
docs:DocumentationNone
chore:MaintenanceNone
test:Tests onlyNone
refactor:Code refactoringNone

Breaking changes: Add !feat!:, fix!:

Examples:

  • feat: add AsyncAPI 3.0 validation support
  • fix: resolve context loading with special characters
  • Added new feature
  • fix bug

PR Checklist

Before submitting:

  • Branch synced with main
  • npm run build passes
  • npm run cli:test passes
  • npm run lint passes (max 5 warnings)
  • Documentation updated (if needed)

Code quality:

  • Follows existing code patterns
  • TypeScript types used (avoid any)
  • Error handling implemented
  • Tests added for new functionality
  • No console.log or commented code

Code Standards

AreaGuideline
TypeScriptExplicit types, interfaces for objects, prefer const
OrganizationFollow existing structure, use path aliases (@/, @cli/, @domains/)
ErrorsUse custom errors from src/errors/, return ServiceResult<T> from services
CommandsExtend base Command, use domain services for business logic

Testing

Add tests for:

  • New commands or API endpoints
  • Bug fixes (regression tests)
  • New domain services
  • Complex business logic
1npm run cli:test      # All tests
2npm run unit:test     # Unit tests only

Best Practices

Avoid Do
Large PRs (>500 lines)Small, focused PRs
Multiple concerns in one PROne issue per PR
Skipping testsComprehensive tests
Hardcoded valuesExternalize configuration
Force push to mainRebase instead of merge

Review Process

  1. CI runs automated checks
  2. Maintainers review code
  3. Address feedback promptly
  4. PR merged when approved

Quick Reference

1# Setup
2npm install && npx lefthook install
3
4# Before PR
5npm run build && npm run lint && npm run cli:test

Quality over speed — Write good code, tests, and documentation.

Was this helpful?
Help us improve the docs by adding your contribution.
OR
Github:AsyncAPICreate Issue on GitHub