Custom Placeholders
The Problem
Generic PR templates try to work for everyone—frontend teams, backend teams, security teams, QA teams—and end up being noise for most.
- Security teams need threat assessment sections
- QA teams need testing checklists
- DevOps teams need deployment impact notes
- Product teams need user-facing change summaries
A one-size-fits-all template actually fits no one well.
The Solution
Define your own template placeholders that get substituted at runtime. Create team-specific workflows without modifying the codebase.
Usage
Pass custom placeholders as JSON in your workflow:
- uses: elvis-ndubuisi/lazypr@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
api_key: ${{ secrets.OPENAI_API_KEY }}
custom_placeholders: |
{
"{{securityReview}}": "Authentication layer changes - internal endpoints only",
"{{threatLevel}}": "Low",
"{{testCoverage}}": "Unit tests added for new auth logic",
"{{rollbackPlan}}": "Revert to previous JWT implementation"
}
Template Example
Create a security-focused template in your repo:
## Security Review
**Threat Level:** {{threatLevel}}
**Scope:** {{securityReview}}
**Testing:** {{testCoverage}}
**Rollback Plan:** {{rollbackPlan}}
### Changes
{{diff}}
lazyPR substitutes the placeholders with your values before sending to the AI.
Common Use Cases
Security-Focused PRs
{
"{{threatLevel}}": "Medium - new API endpoints exposed",
"{{securityReview}}": "Reviewed for OWASP top 10 vulnerabilities",
"{{complianceNotes}}": "GDPR data handling verified"
}
QA Workflows
{
"{{testCases}}": "Added: auth flow, edge cases, error handling",
"{{regressionRisk}}": "Low - isolated to auth module",
"{{manualTesting}}": "Tested on staging environment"
}
Deployment Tracking
{
"{{deploymentImpact}}": "Database migration required",
"{{downtime}}": "Zero-downtime deployment",
"{{monitoring}}": "Alert on auth failure rate"
}
Key Benefits
- Team-specific - Each team defines what matters to them
- Zero code changes - Update placeholders via workflow config
- Flexible - Use any placeholder names you want
- Secure - No template injection vulnerabilities (validated JSON input)
Template Requirements
- Use
{{placeholderName}}format in templates - Define values in
custom_placeholdersJSON - Placeholders can appear multiple times in a template
- Undefined placeholders are left as-is (not replaced)
Your workflow, your way. See templates guide for built-in placeholders.