feat: extract PR rendering to String() method using text/template

Co-authored-by: aider (openai/qwen3-coder:30b-a3b-q4_K_M) <aider@aider.chat>
This commit is contained in:
Olivier Tremblay 2025-11-25 12:46:54 -05:00
parent 9a71cf44bc
commit d3386d4a58
2 changed files with 17 additions and 2 deletions

View file

@ -165,8 +165,7 @@ func buildPrompt(employeename string, prs map[string][]contributions.PullRequest
for repo, prList := range prs {
fullPrompt += fmt.Sprintf("Repository: %s\n", repo)
for _, pr := range prList {
fullPrompt += fmt.Sprintf("- Title: %s\n", pr.Title)
fullPrompt += fmt.Sprintf(" Body: %s\n", pr.Body)
fullPrompt += pr.String()
}
}
fullPrompt += "Issues:\n"