feat: add vikunja task support to summarize function

This commit is contained in:
Olivier Tremblay 2025-11-10 10:08:18 -05:00 committed by Olivier Tremblay (aider)
parent a3fae1c6ed
commit 3e39e519dd

View file

@ -10,6 +10,7 @@ import (
"o5r.ca/autocrossbow/contributions"
"o5r.ca/autocrossbow/issues"
"o5r.ca/autocrossbow/issues/vikunja"
)
const defaultPrompt = `I will provide you, for a given period, with an employee name and a list of Pull Request titles and summaries split by repository, and a list of Jira Issues an employee has worked on. I may also provide, optionally, the employee's self-assessment. If I do, integrate that.
@ -18,7 +19,7 @@ I'd like you to summarize the employee's accomplishments for the quarter
I'd like the summary for the accomplishments to be in prose form, in a few paragraphs separated based on areas of work. Keep answers to 500 words for the summary.`
// SummarizeData takes GitHub PRs and Jira issues data and sends it to an OpenAI-compatible endpoint for summarization.
func SummarizeData(employeename string, prs map[string][]contributions.PullRequest, issues []issues.Issue) (string, error) {
func SummarizeData(employeename string, prs map[string][]contributions.PullRequest, issues []issues.Issue, tasks []vikunja.Task) (string, error) {
// Build a prompt string
prompt := defaultPrompt + fmt.Sprintf("\n\nHere's the PRs and Tickets for the employee %s:\n\n", employeename)
for repo, prList := range prs {