Overview
Pull requests (PRs) are the primary way to contribute code to Aya. A well-crafted PR makes review faster and increases the likelihood of acceptance.All PRs must pass
make ok locally before submission. CI will automatically run the same checks.Before Creating a PR
Ensure Tests Pass
Run all quality checks locally:This must pass without errors. Fix any issues before proceeding.
Verify Commits
Ensure commits follow Conventional Commits:Each commit should have a clear, descriptive message explaining “why” the change was made.
Creating a Pull Request
PR Title Format
Use Conventional Commits format for PR titles:PR Description Template
Use this structure for PR descriptions:Example PR
Title:feat(profiles): add 3-tier locale fallback for translations
Description:
PR Size Guidelines
Keep PRs focused and reasonably sized: ✅ Good PR size:- Single feature or bug fix
- ~100-500 lines changed
- 1-10 files modified
- Reviewable in 15-30 minutes
- Multiple unrelated changes
- 1000+ lines changed
- Affects many subsystems
- Takes hours to review
Code Review Process
What Reviewers Look For
Code Quality
Code Quality
- Follows code style guidelines
- Uses explicit null/undefined checks (no truthy/falsy)
- Proper error handling and logging
- Self-documenting code with meaningful names
- Comments explain “why”, not “what”
Architecture
Architecture
- Frontend: Uses
backendobject, CSS Modules, single props pattern - Backend: Follows hexagonal architecture, business logic has no external deps
- No circular dependencies
- Appropriate separation of concerns
Testing
Testing
- New functionality has tests
- Tests are clear and focused
- Edge cases covered
- All tests pass (
make ok)
Documentation
Documentation
- Public APIs documented
- Complex logic explained
- README or docs updated if needed
- Breaking changes clearly noted
Git Hygiene
Git Hygiene
- Commits follow Conventional Commits
- Commit messages are descriptive
- No merge commits (rebased)
- No debug code, console.logs, TODOs
Review Workflow
Automated Checks Run
CI automatically runs:
- Frontend linting and tests (
deno lint,deno task test:ci) - Backend linting and tests (
make lint,make test) - Build verification
Maintainer Review
A maintainer will review your PR, typically within 2-3 days.They may:
- Approve and merge
- Request changes
- Ask questions for clarification
- Suggest improvements
Address Feedback
If changes are requested:
- Make the requested changes
- Commit with descriptive message:
- Push to your branch:
- Respond to review comments explaining changes
Responding to Review Comments
Best Practices
✅ Do:- Be open to feedback and suggestions
- Ask for clarification if feedback is unclear
- Explain your reasoning for design decisions
- Thank reviewers for their time
- Mark conversations as resolved after addressing them
- Take feedback personally
- Argue endlessly about style preferences
- Ignore feedback or leave comments unresolved
- Make unrelated changes during review
Example Responses
Good responses:Thanks for catching that! I’ve updated the null check to be explicit.
Good point about the error handling. I’ve wrapped the error with context and added a test case.
I see your concern. I chose this approach because [reasoning]. What do you think about [alternative]?Responses to avoid:
It works fine for me. 🤷
That’s just your opinion.
I don’t have time to change that.
Common PR Rejection Reasons
After Your PR is Merged
Special Cases
Draft Pull Requests
Draft Pull Requests
Use draft PRs for work-in-progress or to get early feedback:
- Create PR and mark as “Draft”
- Add “WIP” or “[Draft]” to title
- Explain what’s incomplete in description
- Mark as “Ready for review” when complete
- Won’t be merged
- CI still runs
- Good for discussing approach before finalizing
Breaking Changes
Breaking Changes
If your PR introduces breaking changes:
- Use
BREAKING CHANGE:in commit body: - Document migration path in PR description
- Update documentation
- Add to changelog under “Breaking Changes” section
Security Fixes
Security Fixes
For security vulnerabilities:
- Do NOT create a public PR or issue
- Email [email protected] privately
- Include:
- Description of vulnerability
- Steps to reproduce
- Suggested fix (if you have one)
Documentation-Only PRs
Documentation-Only PRs
For documentation changes:
- Use
docs:prefix in title - No need for extensive testing (typo fixes, clarifications)
- Include screenshots for significant formatting changes
- Verify links work
PR Checklist
Before submitting, verify:-
make okpasses without errors - Commits follow Conventional Commits format
- PR title follows
type(scope): descriptionformat - PR description explains what and why
- Tests added for new functionality
- No console.log, debug code, or TODOs
- Documentation updated (if needed)
- Branch is rebased on latest main
- Code follows style guidelines
- No merge commits (use rebase)
- Related issues referenced (e.g., “Closes #123”)
Getting Help
If you need help with your PR:- Check Documentation: Review development workflow and code style
- Ask in PR Comments: Tag maintainers with questions
- GitHub Discussions: For broader questions about approach
- Look at Recent PRs: See how others structured similar changes
Further Reading
- Development Workflow - Git workflow and branching
- Code Style Guide - Coding standards
- Testing Guidelines - How to write tests
- Conventional Commits - Commit format specification
- How to Write a Git Commit Message - Best practices