MCPcopy Index your code
hub / github.com/simstudioai/sim / transformUpdateCommentResponse

Function transformUpdateCommentResponse

apps/sim/tools/jira/update_comment.ts:9–20  ·  view source on GitHub ↗

* Transforms an update comment API response into typed output.

(data: any, params: JiraUpdateCommentParams)

Source from the content-addressed store, hash-verified

7 * Transforms an update comment API response into typed output.
8 */
9function transformUpdateCommentResponse(data: any, params: JiraUpdateCommentParams) {
10 return {
11 ts: new Date().toISOString(),
12 issueKey: params.issueKey ?? 'unknown',
13 commentId: data?.id ?? params.commentId ?? 'unknown',
14 body: data?.body ? (extractAdfText(data.body) ?? params.body ?? '') : (params.body ?? ''),
15 author: transformUser(data?.author) ?? { accountId: '', displayName: '' },
16 created: data?.created ?? '',
17 updated: data?.updated ?? '',
18 success: true,
19 }
20}
21
22export const jiraUpdateCommentTool: ToolConfig<JiraUpdateCommentParams, JiraUpdateCommentResponse> =
23 {

Callers 1

update_comment.tsFile · 0.85

Calls 2

extractAdfTextFunction · 0.90
transformUserFunction · 0.90

Tested by

no test coverage detected