- One PR should do one thing well (a single feature, bugfix, or refactor).
- Keep PRs small and focused to make review easier.
- Every PR must:
- Pass all CI checks (lint, tests, build).
- Be reviewed and approved by at least one lead before merging.
- Be linked to at least one issue.
- Draft PRs are encouraged for early feedback.
Use the format:
feature/<short-description>for new features
Example:feature/auth-login-endpointfix/<short-description>for bug fixes
Example:fix/catalogue-search-bugchore/<short-description>for maintenance or refactors
Example:chore/update-readme
Use lowercase and hyphens (-), not underscores.
Follow the structure:
<type>(<scope>): <short summary>
Where:
typeis one of:feat,fix,chore,docs,refactor,testscopeis the main module or feature being changed (e.g.auth,catalogue,admin,frontend,backend,history,move-requests)
Examples:
feat(auth): implement JWT login endpointfix(catalogue): correct on-floor filteringrefactor(history): extract location computation helperchore(ci): add linting workflow
Every PR should follow this structure:
### Summary
Short summary of what this PR does and why it matters.
### Related Issues
- Closes #<issue-number>
- Relates to #<issue-number> (if applicable)
### Changes
- Bullet point 1
- Bullet point 2
- Bullet point 3
### How to Test
1. Step-by-step testing instructions
2. Include example commands (e.g. `npm test`, `pytest`, or `curl` requests)
3. Mention any environment variables or setup steps
### Screenshots / UI (if applicable)
- Before:
- After:
### Checklist
- [ ] Tests added or updated
- [ ] CI passes (lint, tests, build)
- [ ] Documentation updated (if behavior changed)
- [ ] No secrets or credentials committed- Always link related issues using GitHub keywords:
Closes #123orFixes #456will auto-close issues when merged.
- If the PR only partially addresses an issue, use:
Relates to #123orPart of #123(avoidCloses).
- Backend PRs:
- Include unit tests for new logic (e.g. APIs, history rules, auth flow).
- Update or add API documentation if endpoints change.
- Frontend PRs:
- Add or update component tests if possible.
- Include screenshots or short descriptions for UI changes.
- No PR should introduce failing tests or lint warnings.
- Each PR must be reviewed and approved by at least one lead.
- As the author:
- Highlight any uncertain areas or breaking changes in the PR description.
- Respond to all review comments before requesting re-approval.
- As the reviewer:
- Focus on correctness, clarity, and maintainability.
- Confirm tests and CI pass before approving.
- Ensure naming, structure, and documentation are consistent.
- Use squash and merge to maintain a clean, linear history.
- Before merging:
- Confirm that all review comments are resolved.
- Ensure CI is green.
- Verify that the PR title is meaningful for the squash commit message.
- Delete the feature branch after merging.
Split large PRs into smaller ones if:
- The PR touches unrelated features (e.g. auth + catalogue + admin).
- The diff is too large to review easily (more than ~400–500 lines changed).
- You have mixed refactors and new features that can be separated.
- Never commit:
- API keys
- Tokens
- Real passwords or
.envfiles
- Use
.env.exampleto document required environment variables. - Verify that
.gitignorecovers secrets and local configuration files.