Pull Request Templates & Guidelines

๐ŸŽฏ PR Templates Overview

We use standardized PR templates to ensure consistency and completeness in our pull requests. Our templates are organized by type of change to make them easier to find and use.


๐Ÿ“‹ Available Templates

For detailed templates with usage guidelines, visit our PR Templates section:


๐Ÿ“ General PR Template

For quick reference, here's our general template that can be used for any type of change:

## ๐Ÿ“ Description

Brief description of what this PR accomplishes and why it's needed.

## ๐ŸŽฏ Type of Change

- [ ] ๐Ÿ› Bug fix (non-breaking change which fixes an issue)
- [ ] โœจ New feature (non-breaking change which adds functionality)
- [ ] ๐Ÿ’ฅ Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] ๐Ÿ“š Documentation update (handbook, readme, instructions)
- [ ] ๐ŸŽจ Code style update (formatting, missing semi colons, etc; no logic change)
- [ ] โ™ป๏ธ Code refactoring (no functional changes)
- [ ] โšก Performance improvement (no feature itself)
- [ ] โœ… Test addition or update 
- [ ] ๐Ÿ”ง Configuration in the repo change
- [ ] ๐Ÿš€ CI/CD or deployment change

## ๐Ÿ”— Related Issues
Closes #[issue number]
Fixes #[issue number]
Related to #[issue(s) number]

## ๐Ÿงช Testing
- [ ] Unit tests
- [ ] Integration tests
- [ ] Manual testing completed

## ๐Ÿ“ธ Screenshots / Video / Evidence working (if applicable)
Add audio/visuals as needed

## ๐Ÿ“‹ Self-Checklist [Not on actual template]
- [ ] Pre-commit is green
- [ ] Code follows our style guidelines
- [ ] Self-review of task completed
- [ ] PR is open in draft ASAP for feedback
- [ ] Granular & conventional commits
- [ ] Documentation updated (if applicable)
- [ ] Tests added/updated (if applicable)
- [ ] No console errors or warnings introduced
- [ ] No TODOs without explanation or follow-up tickets
- [ ] Performance impact considered
- [ ] Security implications reviewed
- [ ] Holistic-platform implications reviewed
- [ ] PR template is ready to be shared & green!

## ๐Ÿš€ Deployment Notes

Any special deployment considerations or database migrations needed.

## ๐Ÿ“š Additional Context

Any additional information that reviewers should know about this change. 
- SQL to be run:
  ```sql
  ALTER TABLE users ADD COLUMN email_verified BOOLEAN DEFAULT FALSE;
  UPDATE users SET email_verified = TRUE WHERE created_at < '2024-01-01';
  • BASH commands to be run:

    npm run build:production
    docker-compose restart api-service
    
  • JSON schemas:

    {
      "type": "object",
      "properties": {
        "userId": {"type": "string"},
        "preferences": {
          "type": "object",
          "properties": {
            "notifications": {"type": "boolean"}
          }
        }
      }
    }
    

---

## ๐Ÿ“‹ **PR Review Guidelines**

### **For Authors**

#### **Before Creating PR**
- [ ] Code is complete and functional
- [ ] Tests are written and passing
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No debugging code or console logs

#### **PR Description**
- [ ] Clear, concise description
- [ ] Issue numbers linked
- [ ] Screenshots included (if applicable)
- [ ] Testing steps documented
- [ ] Deployment notes added

### **For Reviewers**

#### **Review Focus Areas**
- **Functionality**: Does the code do what it's supposed to do?
- **Code Quality**: Is the code readable and maintainable?
- **Testing**: Are there adequate tests?
- **Security**: Any security vulnerabilities?
- **Performance**: Any performance implications?
- **Accessibility**: Accessibility requirements met?

#### **Review Response Time**
- **Urgent Issues**: Respond within 4 hours
- **Normal PRs**: Respond within 24 hours
- **Large Changes**: Respond within 48 hours

#### **Review Feedback**
- **Be Constructive**: Provide specific, actionable feedback
- **Ask Questions**: Clarify unclear implementations
- **Suggest Alternatives**: Offer better approaches when possible
- **Focus on Code**: Critique the code, not the person

---

## ๐Ÿšซ **Common PR Issues to Avoid**

### **Don't Do This**

- โŒ **Large PRs**: Keep changes focused and manageable
- โŒ **Unrelated Changes**: One logical change per PR
- โŒ **Incomplete Work**: Don't submit work-in-progress
- โŒ **Missing Tests**: Always include relevant tests
- โŒ **Poor Descriptions**: Vague or missing descriptions
- โŒ **Ignoring Feedback**: Address reviewer comments
- โŒ **Force Pushing**: Don't rewrite history on shared branches

### **Do This Instead**

- โœ… **Small, Focused PRs**: One feature or fix per PR
- โœ… **Complete Changes**: Fully implemented and tested
- โœ… **Clear Descriptions**: Explain what and why
- โœ… **Comprehensive Testing**: Cover all scenarios
- โœ… **Address Feedback**: Respond to all comments
- โœ… **Clean History**: Maintain clear commit history

---

## ๐Ÿ”„ **PR Lifecycle**

### **1. Creation**
- Create feature branch from `develop`
- Implement changes with clear commits
- Write comprehensive PR description
- Request appropriate reviewers

### **2. Review Process**
- Reviewers provide feedback
- Address all comments and suggestions
- Update code as needed
- Re-request review when ready

### **3. Approval & Merge**
- All reviewers approve
- CI/CD checks pass
- Merge to target branch
- Delete feature branch

### **4. Post-Merge**
- Monitor deployment
- Verify functionality
- Update related documentation
- Close related issues

---

## ๐Ÿ“Š **PR Metrics & KPIs**

### **Key Metrics to Track**

- **PR Size**: Average lines of code per PR
- **Review Time**: Time from creation to first review
- **Merge Time**: Time from creation to merge
- **Review Quality**: Number of review rounds
- **Rejection Rate**: Percentage of PRs rejected

### **Target Benchmarks**

- **PR Size**: <500 lines of code
- **First Review**: <24 hours
- **Merge Time**: <3 days
- **Review Rounds**: <2 rounds
- **Rejection Rate**: <5%

---

## ๐Ÿ”ฎ **Future Improvements**

### **Short-term Goals**

- **Automated PR Templates**: GitHub integration
- **Review Assignment**: Automatic reviewer assignment
- **Quality Gates**: Automated quality checks
- **PR Analytics**: Better metrics and insights

### **Long-term Vision**

- **AI-Powered Reviews**: Automated code review assistance
- **Smart Templates**: Context-aware template suggestions
- **Review Automation**: Automated review processes
- **Integration**: Better CI/CD and deployment integration

---

*These PR templates and guidelines ensure consistency and quality in our development workflow. They evolve with our team needs and project requirements.*

**Last Updated**: September 9, 2025 by @drhinca: Adriรกn Bado Chinca