Skip to content

Commit 7436ba6

Browse files
committed
Format
1 parent 38ff681 commit 7436ba6

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

integrations/intercom-conversations/gitbook-manifest.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ secrets:
1919
CLIENT_SECRET: ${{ env.INTERCOM_CLIENT_SECRET }}
2020
target: organization
2121
envs:
22+
production:
23+
secrets:
24+
CLIENT_ID: ${{ "op://gitbook-x-prod/intercomConversationsIntegration/CLIENT_ID" }}
25+
CLIENT_SECRET: ${{ "op://gitbook-x-prod/intercomConversationsIntegration/CLIENT_SECRET" }}
2226
test:
2327
secrets:
2428
CLIENT_ID: ${{ "op://gitbook-integrations/intercomConversationsStaging/CLIENT_ID" }}

integrations/intercom-conversations/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"scripts": {
1717
"typecheck": "tsc --noEmit",
1818
"check": "gitbook check",
19+
"publish-integrations": "gitbook publish . --env production",
1920
"publish-integrations-staging": "gitbook publish . --env staging"
2021
}
2122
}

integrations/intercom-conversations/src/conversations.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function ingestLastClosedIntercomConversations(context: IntercomRun
3838
value: 'closed',
3939
},
4040
{
41-
field: "created_at",
41+
field: 'created_at',
4242
operator: '>',
4343
value: Math.floor(oneMonthAgo.getTime() / 1000).toString(),
4444
},
@@ -63,14 +63,16 @@ export async function ingestLastClosedIntercomConversations(context: IntercomRun
6363
const intercomConversations = page.data.map((conversation) => conversation.id);
6464
totalConvsToIngest += intercomConversations.length;
6565

66-
pendingTasks.push(queueIntercomIntegrationTask(context, {
67-
type: 'ingest:closed-conversations',
68-
payload: {
69-
organization: installation.target.organization,
70-
installation: installation.id,
71-
conversations: intercomConversations,
72-
},
73-
}));
66+
pendingTasks.push(
67+
queueIntercomIntegrationTask(context, {
68+
type: 'ingest:closed-conversations',
69+
payload: {
70+
organization: installation.target.organization,
71+
installation: installation.id,
72+
conversations: intercomConversations,
73+
},
74+
}),
75+
);
7476

7577
if (!page.hasNextPage()) {
7678
break;

0 commit comments

Comments
 (0)