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

Function makeRequest

apps/sim/tools/jira/update_comment.ts:108–130  ·  view source on GitHub ↗
(cloudId: string)

Source from the content-addressed store, hash-verified

106 if (params?.visibility) payload.visibility = params.visibility
107
108 const makeRequest = async (cloudId: string) => {
109 const commentUrl = `https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/issue/${params!.issueKey?.trim() ?? ''}/comment/${params!.commentId?.trim() ?? ''}`
110 const commentResponse = await fetch(commentUrl, {
111 method: 'PUT',
112 headers: {
113 Accept: 'application/json',
114 'Content-Type': 'application/json',
115 Authorization: `Bearer ${params!.accessToken}`,
116 },
117 body: JSON.stringify(payload),
118 })
119
120 if (!commentResponse.ok) {
121 let message = `Failed to update comment on Jira issue (${commentResponse.status})`
122 try {
123 const err = await commentResponse.json()
124 message = err?.errorMessages?.join(', ') || err?.message || message
125 } catch (_e) {}
126 throw new Error(message)
127 }
128
129 return commentResponse.json()
130 }
131
132 let data: any
133

Callers 1

update_comment.tsFile · 0.70

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected