Pull Request Guidelines
This guide covers how to create and submit pull requests that are easy to review and likely to be merged.
Before You Start
Section titled “Before You Start”- Check existing issues - Look for related issues or PRs before starting work
- Discuss large changes - For significant features, open an issue first to discuss the approach
- Keep PRs focused - One PR should address one concern (feature, bug fix, refactor)
Branch Naming
Section titled “Branch Naming”Use descriptive branch names with a prefix:
| Prefix | Use Case |
|---|---|
feat/ | New features |
fix/ | Bug fixes |
docs/ | Documentation changes |
refactor/ | Code refactoring |
test/ | Adding or updating tests |
chore/ | Maintenance tasks |
Examples:
feat/task-filteringfix/login-redirect-loopdocs/contributing-guiderefactor/task-service
Commit Messages
Section titled “Commit Messages”Follow Conventional Commits format:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting, no code change |
refactor | Code change that neither fixes nor adds |
test | Adding or updating tests |
chore | Maintenance, dependencies |
Examples
Section titled “Examples”# Featurefeat(tasks): add task filtering by status
# Bug fixfix(auth): resolve redirect loop on login
# With scope and bodyfeat(api): add rate limiting to public endpoints
Implements token bucket algorithm with configurablelimits per endpoint. Default is 100 requests per minute.
Closes #123- Use imperative mood: “add feature” not “added feature”
- Keep the first line under 72 characters
- Reference issues in the footer:
Closes #123,Fixes #456
Creating a Pull Request
Section titled “Creating a Pull Request”1. Ensure Quality
Section titled “1. Ensure Quality”Before creating your PR, run these checks locally:
# Lint your codepnpm lint
# Fix auto-fixable issuespnpm lint:fix
# Check typespnpm check-types
# Run tests (if applicable)pnpm -F start test2. Write a Good Description
Section titled “2. Write a Good Description”Your PR description should include:
Summary: What does this PR do? (1-2 sentences)
Changes: List the key changes made
Testing: How was this tested?
Screenshots: For UI changes, include before/after screenshots
Related Issues: Link to related issues
PR Description Template
Section titled “PR Description Template”## SummaryBrief description of what this PR accomplishes.
## Changes- Added X component for Y functionality- Updated Z service to handle edge case- Fixed bug where A caused B
## Testing- [ ] Tested locally with `pnpm dev`- [ ] Added/updated tests- [ ] Verified on multiple browsers (if UI change)
## Screenshots<!-- For UI changes, add screenshots here -->
## Related IssuesCloses #1233. Keep PRs Small
Section titled “3. Keep PRs Small”Aim for PRs that can be reviewed in 15-30 minutes:
- Under 400 lines of code changes (excluding generated files)
- Focused on a single concern
- Easy to understand without extensive context
If your change is large, consider splitting it into multiple PRs.
Review Process
Section titled “Review Process”What Reviewers Look For
Section titled “What Reviewers Look For”- Correctness: Does the code do what it’s supposed to?
- Code style: Does it follow our conventions?
- Performance: Are there any obvious performance issues?
- Security: Are there any security concerns?
- Tests: Are there adequate tests?
- Documentation: Are comments and docs updated?
Responding to Feedback
Section titled “Responding to Feedback”- Be responsive: Try to address feedback within a few days
- Ask questions: If feedback is unclear, ask for clarification
- Discuss disagreements: It’s okay to discuss, but be respectful
- Update your PR: Push new commits to address feedback
Approval Requirements
Section titled “Approval Requirements”- At least one approval from a maintainer
- All CI checks passing
- No unresolved conversations
After Merging
Section titled “After Merging”- Delete your branch (GitHub can do this automatically)
- Close related issues if not auto-closed
- Update any related documentation if needed
Common Issues
Section titled “Common Issues”CI Failures
Section titled “CI Failures”Lint errors:
pnpm lint:fixType errors:
pnpm check-types# Fix reported issuesTest failures:
pnpm -F start test# Review and fix failing testsMerge Conflicts
Section titled “Merge Conflicts”If your branch has conflicts with main:
# Fetch latest changesgit fetch origin
# Rebase onto maingit rebase origin/main
# Resolve conflicts, then continuegit add .git rebase --continue
# Force push (only on your feature branch!)git push --force-with-leaseLarge PRs
Section titled “Large PRs”If reviewers ask you to split your PR:
- Identify logical groupings of changes
- Create new branches for each group
- Submit separate PRs
- Reference the original PR in descriptions
Checklist
Section titled “Checklist”Before marking your PR ready for review:
- Branch is up to date with
main - Code follows the style guide
-
pnpm lintpasses -
pnpm check-typespasses - Tests pass (if applicable)
- PR description is complete
- Screenshots added (for UI changes)
- Related issues linked
- No
console.logor debug code left in - No commented-out code
- Environment variables documented (if new)
Getting Help
Section titled “Getting Help”If you’re stuck or have questions:
- Comment on the related issue
- Ask in the PR comments
- Reach out on GitHub Discussions
We’re happy to help guide you through the process!