Overview
Writing good PR descriptions is important for code review, but it’s often tedious and time-consuming. This automation uses Claude to analyze your code changes and generate clear, well-formatted PR descriptions automatically.
What it does:
- Analyzes the diff of your pull request
- Generates a concise summary of the changes
- Follows your team’s PR template and guidelines
- Runs automatically when a PR is opened
Quick Start
- Navigate to Automations in your Tembo dashboard
- Click Templates Library
- Install the “Generate PR Description” template
- Configure for your repository
That’s it! The automation will now generate descriptions for new PRs.
How It Works
When a pull request is opened, the automation:
- Fetches the diff — Gets all changed files and their modifications
- Analyzes the changes — Claude examines the code to understand what changed and why
- Generates the description — Creates a formatted summary following your guidelines
- Updates the PR — Adds the generated description to the pull request
The automation uses Claude Haiku for fast, cost-effective generation. Even 200+ lines of changes get condensed into a clear, scannable summary.
Configuration
Basic Setup
Trigger: Pull request opened
Prompt Template:
A new pull request has been opened: #{pr_number}
1. Fetch the diff for this PR
2. Analyze the changes:
- What files were modified?
- What is the purpose of these changes?
- Are there any breaking changes?
3. Generate a PR description following this format:
## Summary
[1-2 sentence overview of the changes]
## Changes
- [Bulleted list of key changes]
## Testing
- [How to test these changes]
4. Update the PR description with the generated content
MCP Servers Needed: GitHub
Customization Options
Team-Specific Templates
Different teams often have different PR standards. You can customize the automation for specific contexts:
Frontend Team:
Include in the description:
- Components added/modified
- Visual changes (screenshots if applicable)
- Browser compatibility notes
- Accessibility considerations
Backend Team:
Include in the description:
- API changes (endpoints, parameters)
- Database migrations
- Performance implications
- Backward compatibility notes
Repository Filters
Configure the automation to run only on specific repositories:
- Run on
frontend-* repos with frontend template
- Run on
api-* repos with backend template
- Skip documentation-only repos
Author Filters
Trigger based on PR author:
- Different templates for junior vs senior developers
- Skip for bot-created PRs
- Custom templates for external contributors
Example Output
Summary: Implements OAuth2 authentication with Google and GitHub providers.
Changes: Added AuthProvider component, OAuth callback handlers, token refresh logic, protected route wrapper.
Testing: Run npm test for unit tests, npm run dev:auth for local OAuth testing.
Tips for Better Results
- Provide context — Include your tech stack (e.g., “Next.js with TypeScript”) in the prompt for more relevant descriptions
- Include your PR template — Paste your team’s existing format so the automation follows the same structure
- Specify exclusions — Tell it to skip obvious details like line-by-line explanations
- Handle edge cases — Add instructions for doc-only PRs, dependency updates, or other special scenarios