feat: add vikunja task support to summarize function
This commit is contained in:
parent
a3fae1c6ed
commit
3e39e519dd
1 changed files with 2 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ import (
|
||||||
|
|
||||||
"o5r.ca/autocrossbow/contributions"
|
"o5r.ca/autocrossbow/contributions"
|
||||||
"o5r.ca/autocrossbow/issues"
|
"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.
|
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.`
|
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.
|
// 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
|
// Build a prompt string
|
||||||
prompt := defaultPrompt + fmt.Sprintf("\n\nHere's the PRs and Tickets for the employee %s:\n\n", employeename)
|
prompt := defaultPrompt + fmt.Sprintf("\n\nHere's the PRs and Tickets for the employee %s:\n\n", employeename)
|
||||||
for repo, prList := range prs {
|
for repo, prList := range prs {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue