๐ Pull Requests โ
๐ฟ Branch Naming โ
Use descriptive branch names with a prefix:
| Prefix | Use |
|---|---|
๐ feat/ | New feature |
๐ fix/ | Bug fix |
๐ docs/ | Documentation changes |
โป๏ธ refactor/ | Code refactoring |
๐งช test/ | Adding or updating tests |
๐ง chore/ | Maintenance, dependency updates |
Examples: feat/table-reservations, fix/order-total-calculation, docs/api-reference
๐ Conventional Commits โ
Use Conventional Commits for commit messages:
feat: add table reservation system
fix: correct order total calculation with coupons
docs: add API reference for loyalty endpoints
refactor: extract payment processing into service
test: add integration tests for coupon validation
chore: update Prisma to v5.22Include a scope when helpful:
feat(reservations): add availability check endpoint
fix(payments): handle Stripe webhook signature verificationโ PR Checklist โ
Before submitting a pull request, ensure:
- [ ] ๐จ Code compiles (
npx tsc --noEmit) - [ ] ๐งฉ Unit tests pass (
npm run test:unit) - [ ] ๐ Integration tests pass (
npm run test:integration) - [ ] ๐งช New features have tests
- [ ] ๐ API changes are documented
- [ ] ๐ซ No
console.logstatements left in - [ ] ๐ Environment variables are documented in
.env.example
๐ Review Process โ
- ๐ค Open a PR against
main - ๐ค CI pipeline runs automatically
- โ At least one approval is required
- ๐ข All CI checks must pass
- ๐ Merge with squash or rebase (keep a clean history)
๐ What to Include in a PR Description โ
- ๐ What โ Brief description of the change
- ๐ก Why โ Motivation or issue being solved
- ๐ง How โ Key implementation decisions
- ๐งช Testing โ How the change was tested
- ๐ธ Screenshots โ For UI changes
๐ Squash Merge Convention โ
We use squash merges to keep main history clean. Because of this:
- ๐ PR title must be a conventional commit โ It becomes the squash commit message (e.g.,
feat: add table reservation system) - ๐ PR description becomes the commit body โ Write it as a meaningful commit description, not just a review checklist
- ๐ท๏ธ Include a scope in the title when helpful (e.g.,
fix(payments): handle webhook retries)
Example PR title and body that produce a clean squash commit:
Title: feat(reservations): add availability check with party size validation
Body:
Add real-time table availability checking that considers party size,
existing reservations, and restaurant hours. Includes admin UI for
managing table configurations per location.
- Add GET /api/reservations/availability endpoint
- Add table management UI in admin panel
- Add integration tests for availability logic