| title | description | category | tags | difficulty | last-updated | |||
|---|---|---|---|---|---|---|---|---|
Pull Request Guidelines |
How to submit and review pull requests. |
tutorial |
|
beginner |
2026-01-16 |
How to submit and review pull requests.
- Code follows code style guidelines
- Tests added/updated for changes
- All tests pass (
npm run test) - Type checking passes (
npm run check) - Linting passes (
npm run lint) - Documentation updated if needed
- Commit messages follow conventions
npm run check && npm run lint && npm run testgit push -u origin feature/your-featureUse the PR template:
## Summary
Brief description of changes.
## Changes
- Change 1
- Change 2
- Change 3
## Testing
- [ ] Unit tests added
- [ ] Integration tests added
- [ ] Manual testing completed
## Screenshots
(If applicable)
## Related Issues
Fixes #123Title format:
<type>(<scope>): <description>
Examples:
- fix(chat): correct message timestamp display
- feat(calendar): add recurring events support
- docs(readme): update installation instructions
Description should include:
- What changes were made
- Why they were made
- How to test them
- Any breaking changes
- Small: < 200 lines changed
- Medium: 200-500 lines changed
- Large: > 500 lines (try to split)
Split if your PR:
- Touches multiple unrelated features
- Includes refactoring AND new features
- Has > 500 lines of changes
- Takes > 30 minutes to review
Example split:
Instead of one PR with:
- Database schema changes
- API changes
- UI changes
- Tests
Create three PRs:
- PR 1: Database schema changes
- PR 2: API changes (depends on PR 1)
- PR 3: UI changes + tests (depends on PR 2)
flowchart TD
A[Submit PR] --> B[CI Checks]
B -->|Pass| C[Request Review]
B -->|Fail| D[Fix Issues]
D --> B
C --> E{Review}
E -->|Changes Requested| F[Address Feedback]
F --> E
E -->|Approved| G[Merge]
- Initial review: 2-3 working days
- Follow-up reviews: 1-2 days
- CI checks: ~5-10 minutes
Every PR runs:
- Lint — Code style
- Type Check — TypeScript
- Unit Tests — Vitest
- Build — Production build
All must pass before merge.
<!-- Acknowledge and explain -->
> Consider using a more descriptive variable name
Good point! Changed `x` to `messageCount` in abc123.
<!-- Ask for clarification -->
> This could be simplified
Could you elaborate? I tried X but it didn't handle Y case.
<!-- Respectfully disagree -->
> Use a different approach
I see the merit, but I chose this approach because [reason].
Happy to discuss further or change if you feel strongly.# Make changes
git add .
git commit -m "address review: improve variable naming"
# Push to update PR
git pushAfter addressing all comments, click "Re-request review" on GitHub.
- All CI checks pass
- At least one approval
- No unresolved conversations
- Branch is up to date with main
We use Squash and Merge:
- All commits combined into one
- Clean history on main branch
- Original commits preserved in PR
- Delete your feature branch
- Close related issues
- Celebrate!
## Summary
Add [feature] to enable [capability].
## Changes
- Added `NewComponent.svelte` for [purpose]
- Updated `service.ts` to support [feature]
- Added tests for new functionality
## Testing
- [x] Unit tests cover new code
- [x] Manual testing in development
- [ ] Tested on mobile viewport
## Screenshots
*[Screenshot of feature - add actual screenshot here]*
## Breaking Changes
None
## Related Issues
Implements #123## Summary
Fix [bug description] that caused [problem].
## Root Cause
[Explanation of what was wrong]
## Solution
[Explanation of the fix]
## Changes
- Fixed `function.ts` to handle [edge case]
- Added test to prevent regression
## Testing
- [x] Added test that reproduces bug
- [x] Test now passes with fix
- [x] Existing tests still pass
## Related Issues
Fixes #456## Summary
Update documentation for [topic].
## Changes
- Added section on [topic]
- Fixed broken links in [file]
- Updated examples in [file]
## Preview
[Link to preview if available]
## Related Issues
Addresses #789# Check locally first
npm run check && npm run lint && npm run test
# Fix issues, then push
git add .
git commit -m "fix: resolve CI failures"
git push# Update from main
git fetch origin
git rebase origin/main
# Resolve conflicts
# Edit conflicted files
git add .
git rebase --continue
# Force push (only to your branch!)
git push --force-with-lease# Update and rebase
git fetch origin
git rebase origin/main
git push --force-with-lease- Keep PRs small and focused
- Write clear descriptions
- Respond to feedback promptly
- Be open to suggestions
- Review within 2-3 days
- Be constructive
- Explain the "why"
- Approve when ready
- Code Style — Coding standards
- Testing — Testing guidelines
- Contributing Guide — Overall contribution process