Commit 461f3e1
fix: ensure PR summarizer uses template for JSON format instructions
## Problem
PR summarizer was passing raw PR content directly to Gemini without
wrapping it in the prompt template, causing the AI to echo back the
PR metadata as JSON instead of generating a proper summary.
This resulted in error:
"422 Validation Failed - missing_field: title"
## Solution
- Modified GeneratePRSummary to call generatePRPrompt() to wrap PR
content in the template with JSON format instructions
- Added validation to ensure title is not empty before returning
- Added detailed error message showing AI response when title is missing
## Impact
- PR summarization now works correctly
- AI generates proper JSON with title, body, and labels
- Better error messages for debugging
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 58ea791 commit 461f3e1
1 file changed
Lines changed: 14 additions & 1 deletion
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
85 | 98 | | |
86 | 99 | | |
87 | 100 | | |
| |||
0 commit comments