MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / handleIssueCommentCreated

Function handleIssueCommentCreated

packages/integration-github/src/inbound.ts:150–172  ·  view source on GitHub ↗
(
  payload: GitHubTypes.IssueCommentCreatedEvent
)

Source from the content-addressed store, hash-verified

148}
149
150async function handleIssueCommentCreated(
151 payload: GitHubTypes.IssueCommentCreatedEvent
152) {
153 const { channel, externalThreadId } = await handleCommon(payload);
154 const user = await handleUser(payload.comment.user, channel);
155
156 const thread = await linenSdk.getThread({
157 externalThreadId,
158 channelId: channel.id,
159 });
160 if (!thread) {
161 throw new Error('thread not found');
162 }
163 // create new message
164 const message = Serializer.githubCommentToLinenMessage(
165 payload,
166 user.id,
167 channel.id,
168 channel.accountId,
169 thread.id
170 );
171 await linenSdk.createNewMessage(message);
172}

Callers 1

inbound.tsFile · 0.85

Calls 5

handleCommonFunction · 0.85
getThreadMethod · 0.80
createNewMessageMethod · 0.80
handleUserFunction · 0.70

Tested by

no test coverage detected