@@ -330,9 +330,7 @@ export async function createGithubConnection(
330330 integrationId : string ,
331331 repo : IGithubRepoData ,
332332) : Promise < string > {
333- svc . log . info (
334- `Creating nango connection for integration ${ integrationId } and repo ${ repo . owner } /${ repo . repoName } !` ,
335- )
333+ svc . log . info ( { integrationId } , `Creating nango connection repo ${ repo . owner } /${ repo . repoName } !` )
336334
337335 await initNangoCloudClient ( )
338336
@@ -374,6 +372,10 @@ export async function setGithubConnection(
374372 repo : IGithubRepoData ,
375373 connectionId : string ,
376374) : Promise < void > {
375+ svc . log . info (
376+ { integrationId } ,
377+ `Setting github connection for repo ${ repo . owner } /${ repo . repoName } !` ,
378+ )
377379 // store connectionId - repo mapping in integration.settings.nangoMapping object
378380 await addGithubNangoConnection (
379381 dbStoreQx ( svc . postgres . writer ) ,
@@ -388,15 +390,18 @@ export async function removeGithubConnection(
388390 integrationId : string ,
389391 connectionId : string ,
390392) : Promise < void > {
393+ svc . log . info ( { integrationId } , `Removing github connection ${ connectionId } !` )
391394 // remove connectionId - repo mapping from integration.settings.nangoMapping object
392395 await removeGithubNangoConnection ( dbStoreQx ( svc . postgres . writer ) , integrationId , connectionId )
393396}
394397
395398export async function startNangoSync (
399+ integrationId : string ,
396400 providerConfigKey : string ,
397401 connectionId : string ,
398402) : Promise < void > {
399403 svc . log . info (
404+ { integrationId } ,
400405 `Starting nango sync for connection ${ connectionId } for provider ${ providerConfigKey } !` ,
401406 )
402407
@@ -405,16 +410,24 @@ export async function startNangoSync(
405410}
406411
407412export async function deleteConnection (
413+ integrationId : string ,
408414 providerConfigKey : string ,
409415 connectionId : string ,
410416) : Promise < void > {
411- svc . log . info ( `Deleting nango connection ${ connectionId } for provider ${ providerConfigKey } !` )
417+ svc . log . info (
418+ { integrationId } ,
419+ `Deleting nango connection ${ connectionId } for provider ${ providerConfigKey } !` ,
420+ )
412421
413422 await initNangoCloudClient ( )
414423 await deleteNangoConnection ( providerConfigKey as NangoIntegration , connectionId )
415424}
416425
417426export async function mapGithubRepo ( integrationId : string , repo : IGithubRepoData ) : Promise < void > {
427+ svc . log . info (
428+ { integrationId } ,
429+ `Adding github repo mapping for integration ${ integrationId } and repo ${ repo . owner } /${ repo . repoName } !` ,
430+ )
418431 await addGitHubRepoMapping (
419432 dbStoreQx ( svc . postgres . writer ) ,
420433 integrationId ,
@@ -424,6 +437,10 @@ export async function mapGithubRepo(integrationId: string, repo: IGithubRepoData
424437}
425438
426439export async function unmapGithubRepo ( integrationId : string , repo : IGithubRepoData ) : Promise < void > {
440+ svc . log . info (
441+ { integrationId } ,
442+ `Removing github repo mapping for repo ${ repo . owner } /${ repo . repoName } !` ,
443+ )
427444 // remove repo from githubRepos mapping
428445 await removeGitHubRepoMapping (
429446 dbStoreQx ( svc . postgres . writer ) ,
@@ -438,6 +455,10 @@ export async function updateGitIntegrationWithRepo(
438455 integrationId : string ,
439456 repo : IGithubRepoData ,
440457) : Promise < void > {
458+ svc . log . info (
459+ { integrationId } ,
460+ `Updating git integration with repo ${ repo . owner } /${ repo . repoName } for integration ${ integrationId } !` ,
461+ )
441462 const repoUrl = `https://github.com/${ repo . owner } /${ repo . repoName } `
442463 const forkedFrom = await GithubIntegrationService . getForkedFrom ( repo . owner , repo . repoName )
443464 await addRepoToGitIntegration ( dbStoreQx ( svc . postgres . writer ) , integrationId , repoUrl , forkedFrom )
@@ -465,7 +486,7 @@ function parseGithubUrl(url: string): IGithubRepoData {
465486}
466487
467488export async function syncGithubReposToInsights ( integrationId : string ) : Promise < void > {
468- svc . log . info ( `Syncing GitHub repositories to insights for integration ${ integrationId } ` )
489+ svc . log . info ( { integrationId } , `Syncing GitHub repositories to insights! ` )
469490
470491 const qx = dbStoreQx ( svc . postgres . writer )
471492 await CommonIntegrationService . syncGithubRepositoriesToInsights ( qx , svc . redis , integrationId )
0 commit comments