.github/pull_request_template.md.
Template Structure
Here’s the current PR template from the repository:- Description section: A dedicated space for contributors to explain what changed and why
- Checklist items: Essential pre-merge requirements that must be verified
The template automatically populates when creating a new pull request on GitHub, making it easy for contributors to fill in the required information.
Checklist Items Explained
Each checklist item serves a specific purpose:Lint & tests OK
Lint & tests OK
Ensures that:
- All linting rules pass without warnings or errors
- Unit tests, integration tests, and e2e tests all pass
- Code coverage requirements are met
- The build completes successfully
npm test or your project’s equivalent before submitting.Security reviewed
Security reviewed
Requires the contributor to:
- Review code for potential security vulnerabilities
- Check for exposed secrets or API keys
- Validate input sanitization and authentication
- Consider potential attack vectors
Docs updated
Docs updated
Ensures documentation stays in sync with code changes:
- Update README files if user-facing features changed
- Add or modify API documentation
- Update configuration examples
- Add migration guides for breaking changes
Customization Guide
Adding More Sections
You can extend the template with additional sections that fit your workflow:Adding Conditional Checklists
For different types of changes, you can include conditional sections:Adding Review Guidelines
Help reviewers by including guidance:Best Practices
- Keep it actionable: Every section should have a clear purpose
- Use checkboxes: They provide visual progress and clear completion status
- Include examples: Link to exemplary PRs for reference
- Update regularly: Review and refine based on team feedback
- Automate checks: Use GitHub Actions to enforce checklist items
Multiple Templates
For projects with diverse contribution types, you can create multiple PR templates:When using multiple templates, remove the root
pull_request_template.md file to prevent conflicts.Integration with CI/CD
You can enforce checklist items using GitHub Actions:See Also
- Issue Templates - Configure issue templates
- GitHub Actions Workflows - Automate PR workflows
- Best Practices - Integration and troubleshooting guides