Last updated
Repository File Locations by Platform
- GitHub single template:
.github/pull_request_template.md - GitHub multiple templates:
.github/PULL_REQUEST_TEMPLATE/feature.md,bugfix.md, etc. - GitLab default template:
.gitlab/merge_request_templates/Default.md - GitLab multiple templates:
.gitlab/merge_request_templates/Feature.md,Hotfix.md, etc. - Bitbucket: Configure in repository settings under "Pull requests"
Tips for Effective PR Templates
- Keep checklists short — long checklists get ignored; focus on the most important items
- Use HTML comments (
<!-- -->) for instructions that won't appear in the rendered PR - Link issues with closing keywords: "Closes #123" auto-closes the issue when the PR merges
- Include a screenshots section for any PR that touches the UI
- Add a rollback plan section for changes that touch production data or infrastructure
Examples
Example 1: Standard GitHub PR Template
File location: .github/pull_request_template.md
## Description
<!-- Explain what changes were made and why -->
Closes #<issue-number>
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality to change)
- [ ] Documentation update
- [ ] Refactor (no functional changes)
- [ ] Performance improvement
- [ ] Dependency update
## How Has This Been Tested?
- [ ] Unit tests
- [ ] Integration tests
- [ ] Manual testing
**Test environment:** <describe your test setup>
## Checklist
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have added tests that prove my fix/feature works
- [ ] New and existing unit tests pass locally
- [ ] I have updated the documentation accordingly
- [ ] My changes generate no new warnings or errors
- [ ] I have checked for potential breaking changes
## Screenshots (if applicable)
| Before | After |
|--------|-------|
| | |
Example 2: GitLab Merge Request Template
File location: .gitlab/merge_request_templates/Default.md
## Summary
<!-- Brief description of what this MR does -->
Related issue: #<issue-number>
## Changes Made
<!-- List the key changes in this MR -->
-
-
-
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation
- [ ] Refactor
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manually tested in development environment
## Deployment Notes
<!-- Any environment variables, migrations, or deployment steps required? -->
- [ ] No deployment changes required
- [ ] Requires environment variable changes: <describe>
- [ ] Requires database migration
- [ ] Requires cache invalidation
## Rollback Plan
<!-- How to revert this change if issues are found in production? -->
## Reviewer Notes
<!-- Anything specific you want reviewers to focus on? -->
Example 3: Feature-Specific Template
File location: .github/PULL_REQUEST_TEMPLATE/feature.md
## Feature Description
**What does this feature do?**
**Why is this feature needed?**
**Link to design/spec:** <URL>
## Implementation Details
<!-- Technical approach and key decisions -->
## API Changes
- [ ] No API changes
- [ ] New endpoints added (list below)
- [ ] Existing endpoints modified (list below)
- [ ] Breaking API changes (requires version bump)
**Changed endpoints:**
## Database Changes
- [ ] No database changes
- [ ] New tables/columns added
- [ ] Migration script included: `db/migrations/YYYYMMDD_description.sql`
- [ ] Indexes added for performance
## Feature Flags
- [ ] Feature is behind a feature flag: `FEATURE_FLAG_NAME`
- [ ] Feature is enabled by default
- [ ] Feature flag cleanup ticket: #<issue-number>
## Testing
- [ ] Unit tests: >80% coverage on new code
- [ ] Integration tests for new endpoints
- [ ] E2E tests updated
- [ ] Performance tested (no regression)
## Screenshots / Demo
<!-- Add screenshots or a link to a demo video -->