File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed
integrations/intercom-conversations Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ secrets:
1919 CLIENT_SECRET : ${{ env.INTERCOM_CLIENT_SECRET }}
2020target : organization
2121envs :
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" }}
Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments