* Transforms a raw Jira comment object into typed output.
(comment: any)
| 7 | * Transforms a raw Jira comment object into typed output. |
| 8 | */ |
| 9 | function transformComment(comment: any) { |
| 10 | return { |
| 11 | id: comment.id ?? '', |
| 12 | body: extractAdfText(comment.body) ?? '', |
| 13 | author: transformUser(comment.author) ?? { accountId: '', displayName: '' }, |
| 14 | authorName: comment.author?.displayName ?? comment.author?.accountId ?? 'Unknown', |
| 15 | updateAuthor: transformUser(comment.updateAuthor), |
| 16 | created: comment.created ?? '', |
| 17 | updated: comment.updated ?? '', |
| 18 | visibility: comment.visibility |
| 19 | ? { type: comment.visibility.type ?? '', value: comment.visibility.value ?? '' } |
| 20 | : null, |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export const jiraGetCommentsTool: ToolConfig<JiraGetCommentsParams, JiraGetCommentsResponse> = { |
| 25 | id: 'jira_get_comments', |
nothing calls this directly
no test coverage detected