* Transforms a raw Jira worklog object into typed output.
(worklog: any)
| 7 | * Transforms a raw Jira worklog object into typed output. |
| 8 | */ |
| 9 | function transformWorklog(worklog: any) { |
| 10 | return { |
| 11 | id: worklog.id ?? '', |
| 12 | author: transformUser(worklog.author) ?? { accountId: '', displayName: '' }, |
| 13 | authorName: worklog.author?.displayName ?? worklog.author?.accountId ?? 'Unknown', |
| 14 | updateAuthor: transformUser(worklog.updateAuthor), |
| 15 | comment: worklog.comment ? (extractAdfText(worklog.comment) ?? null) : null, |
| 16 | started: worklog.started ?? '', |
| 17 | timeSpent: worklog.timeSpent ?? '', |
| 18 | timeSpentSeconds: worklog.timeSpentSeconds ?? 0, |
| 19 | created: worklog.created ?? '', |
| 20 | updated: worklog.updated ?? '', |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export const jiraGetWorklogsTool: ToolConfig<JiraGetWorklogsParams, JiraGetWorklogsResponse> = { |
| 25 | id: 'jira_get_worklogs', |
nothing calls this directly
no test coverage detected