Skip to content

Commit 70b996d

Browse files
authored
feat: add sourcePlatform in mappedRepos response (#3821)
1 parent b7a13e3 commit 70b996d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • services/libs/data-access-layer/src/repositories

services/libs/data-access-layer/src/repositories/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ export interface IRepositoryMapping {
318318
}
319319
gitIntegrationId: string
320320
sourceIntegrationId: string
321+
sourcePlatform: string
321322
}
322323

323324
/**
@@ -341,9 +342,11 @@ export async function getIntegrationReposMapping(
341342
'name', s.name
342343
) as segment,
343344
r."gitIntegrationId",
344-
r."sourceIntegrationId"
345+
r."sourceIntegrationId",
346+
i.platform as "sourcePlatform"
345347
FROM public.repositories r
346348
JOIN segments s ON s.id = r."segmentId"
349+
LEFT JOIN integrations i ON i.id = r."sourceIntegrationId"
347350
WHERE (r."gitIntegrationId" = $(integrationId) OR r."sourceIntegrationId" = $(integrationId))
348351
AND r."deletedAt" IS NULL
349352
ORDER BY r.url

0 commit comments

Comments
 (0)