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

Function processGithubIntegration

packages/integration-github/src/outbound.ts:34–74  ·  view source on GitHub ↗
({
  channelId,
  messageId,
  threadId,
  event,
  integration,
  id,
}: TwoWaySyncType & {
  integration: channelsIntegration;
})

Source from the content-addressed store, hash-verified

32};
33
34export async function processGithubIntegration({
35 channelId,
36 messageId,
37 threadId,
38 event,
39 integration,
40 id,
41}: TwoWaySyncType & {
42 integration: channelsIntegration;
43}) {
44 if (event === 'newThread') {
45 return await processNewThread({ threadId, integration });
46 }
47 if (event === 'threadClosed') {
48 return await processThreadUpdate({
49 threadId,
50 integration,
51 event,
52 });
53 }
54 if (event === 'threadReopened') {
55 return await processThreadUpdate({
56 threadId,
57 integration,
58 event,
59 });
60 }
61 if (event === 'newMessage') {
62 return await processNewMessage({
63 messageId,
64 integration,
65 });
66 }
67 if (event === 'threadUpdated') {
68 return await processThreadUpdate({
69 threadId,
70 integration,
71 event,
72 });
73 }
74}
75
76async function processNewMessage({
77 messageId,

Callers 1

twoWaySyncJobFunction · 0.90

Calls 3

processNewThreadFunction · 0.70
processThreadUpdateFunction · 0.70
processNewMessageFunction · 0.70

Tested by

no test coverage detected