--- url: "https://asyncapi.com/docs/tools/cli/contributing-prs" titulek: "Contributing via Pull Requests | AsyncAPI Initiative for event-driven APIs" h1: "Contributing via Pull Requests" popis: "Contributing via Pull Requests Getting Started Open an issue first (unless it's a trivial fix) Set up environment — Follow DEVELOPMENT.md Create a branch — Use prefixes: feat/, fix/, docs/, refactor" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 02:46:28" znaku: 2961 slov: 391 kodovani: "utf-8" sha256: "fd49c4d5b8c2bc5620b59d53f979f0d11c8e5cadfc0a2752b247e4a7025118a3" --- ##### On this page Contributing via Pull Requests Getting Started PR Title Format PR Checklist Code Standards Testing Best Practices Review Process Quick Reference # Contributing via Pull Requests Found an error? Have a suggestion?[Edit this page on GitHub](https://github.com/asyncapi/cli/tree/master/docs/contributing-prs.md) # Contributing via Pull Requests ## Getting Started 1. **Open an issue first** (unless it's a trivial fix) 2. **Set up environment** — Follow [DEVELOPMENT.md](../DEVELOPMENT.md) 3. **Create a branch** — Use prefixes: `feat/` , `fix/` , `docs/` , `refactor/` , `test/` , `chore/` --- ## PR Title Format Follow [Conventional Commits](https://www.conventionalcommits.org/): | Type | Description | Release | | --- | --- | --- | | `feat:` | New feature | MINOR | | `fix:` | Bug fix | PATCH | | `docs:` | Documentation | None | | `chore:` | Maintenance | None | | `test:` | Tests only | None | | `refactor:` | Code refactoring | None | **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 | Area | Guideline | | --- | --- | | **TypeScript** | Explicit types, interfaces for objects, prefer `const` | | **Organization** | Follow existing structure, use path aliases (`@/`, `@cli/`, `@domains/`) | | **Errors** | Use custom errors from `src/errors/`, return `ServiceResult` from services | | **Commands** | Extend 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 ``` npm run cli:test # All tests npm run unit:test # Unit tests only ``` --- ## Best Practices | ❌ Avoid | ✅ Do | | --- | --- | | Large PRs (>500 lines) | Small, focused PRs | | Multiple concerns in one PR | One issue per PR | | Skipping tests | Comprehensive tests | | Hardcoded values | Externalize configuration | | Force push to main | Rebase 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 ``` # Setup npm install && npx lefthook install # Before PR npm run build && npm run lint && npm run cli:test ``` **Quality over speed** — Write good code, tests, and documentation. [Go BackUsage](/docs/tools/cli/usage) [Up NextGitHub Action for CLI](/docs/tools/cli/github-action) Was this helpful? Help us improve the docs by sharing your feedback. [Submit Feedback](https://github.com/asyncapi/website/issues/new?template=docs-feedback.yml&title=Docs%20Feedback%3A%20%2Fdocs%2Ftools%2Fcli%2Fcontributing-prs&labels=%F0%9F%93%91%20docs) OR [Create Issue on GitHub](https://github.com/asyncapi/website/issues/new/choose)