Title Enhancement
The Problem
We’ve all seen (and written) these PR titles:
- “fixes”
- “updates”
- “WIP”
- “hotfix”
- “Feat/auth-integration” (branch name as title)
Vague titles force reviewers to read the entire diff just to understand what’s happening. That’s 5-10 minutes of context-building before actual review can begin.
The Solution
lazyPR uses a hybrid pattern + AI approach to analyze and improve vague titles automatically.
Example transformation:
❌ Before: “fixes”
✅ After: “Fix authentication token validation in auth service”
The improved title tells reviewers exactly what to expect before they open a single file.
How It Works
lazyPR uses a cost-optimized hybrid approach:
PR Title
↓
[Pattern Check] → Obviously vague? (score >= 60) → Rename immediately (no AI)
↓
[Branch Name Check] → Looks like branch name? → AI evaluates
↓
[Threshold Check] → Score >= threshold? → Rename immediately (no AI)
↓
✓ Keep title
Cost Optimization
| Scenario | AI Call? | Tokens | Cost |
|---|---|---|---|
fixes, wip (obvious vague) | ❌ No | 0 | $0 |
Add login button (descriptive) | ❌ No | 0 | $0 |
feat/auth-integration (branch name) | ✅ Yes | ~300 | ~$0.001 |
~80% of PRs require no AI call. When AI is needed, it uses ~10x fewer tokens than full summary generation.
Branch Name Detection
When GitHub creates a PR from a branch via the web interface, it often uses the branch name as the title:
| Branch Name | Default PR Title | lazyPR Action |
|---|---|---|
feat/auth-integration | Feat/auth-integration | AI evaluates |
fix-null-pointer | Fix-null-pointer | AI evaluates |
auth_integration | Auth_integration | AI evaluates |
These patterns trigger AI evaluation (not auto-rename) to intelligently decide if they’re descriptive enough.
Branch Patterns Detected
- Conventional branches:
feat/*,fix/*,chore/*,docs/*,refactor/*,test/*, etc. - Kebab-case: Titles with hyphens but no spaces (e.g.,
auth-integration) - Underscore-style: Titles with underscores but no spaces (e.g.,
auth_integration)
The AI uses minimal context (max 5 files) to suggest a proper title if the branch name isn’t descriptive.
Usage
Enable title enhancement in your workflow:
- uses: elvis-ndubuisi/lazypr@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
api_key: ${{ secrets.OPENAI_API_KEY }}
auto_update_title: true
Configuration
| Input | Default | Description |
|---|---|---|
auto_update_title | false | Enable automatic title updates |
vagueness_threshold | 40 | Score (0-100) that triggers auto-rename. Lower = more aggressive |
Threshold Guide
| Threshold | Behavior | Catches |
|---|---|---|
40 (default) | Aggressive | ”fixes”, “updates”, “wip”, “hotfix”, “done” |
50 | Moderate | Very generic single-word titles |
70 | Lenient | Only extremely vague titles |
Example with custom threshold:
- uses: elvis-ndubuisi/lazypr@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
api_key: ${{ secrets.OPENAI_API_KEY }}
auto_update_title: true
vagueness_threshold: 50 # Less aggressive
Vague Patterns Detected
lazyPR catches these common lazy dev patterns:
Action verbs without context:
fix,fixes,fixed,fixingupdate,updates,updated,updatingchange,changes,changed,changingadd,adds,added,addingremove,removes,removed,removing
Rush indicators:
wip,tmp,temp,drafthotfix,bugfix,quick,asap,urgenthack,fixme,todo
Generic nouns:
code,file,bug,issue,problemstuff,things,main,test
Output
When enabled, PR titles are updated with descriptive alternatives:
| Original | Enhanced |
|---|---|
| ”fixes" | "Fix authentication token validation in auth service" |
| "updates" | "Update user profile component with avatar support" |
| "wip" | "Update checkout flow with payment integration" |
| "hotfix" | "Fix null pointer exception in payment processor” |
Output: The enhanced_title output contains the updated title (empty if no change needed).
Key Benefits
- Faster reviews - Reviewers know what to expect immediately
- Better communication - Clear titles improve team coordination
- Historical clarity - Git history becomes self-documenting
- Zero friction - Works automatically without manual intervention
When Titles Get Enhanced
lazyPR scores titles based on:
- Title length (very short = higher score)
- Generic action verbs without context
- Rush/temporary indicators
- Missing ticket references
- Generic nouns without specifics
Note: Already descriptive titles are left unchanged.
_Write once, communicate clearly. See user guide for other quality features.