-
Notifications
You must be signed in to change notification settings - Fork 725
chore: deprecate insightsProject.repositories and use repositories [CM-911] #3806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -660,17 +660,18 @@ export async function findNangoRepositoriesToBeRemoved( | |
| export async function findRepositoriesForSegment( | ||
| qx: QueryExecutor, | ||
| segmentId: string, | ||
| ): Promise<Record<string, Array<{ url: string; label: string }>>> { | ||
| ): Promise<Record<string, Array<{ url: string; label: string; enabled: boolean }>>> { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused exported function after refactoringLow Severity The |
||
| // Get all repos grouped by platform (github-nango merged into github) | ||
| const reposByPlatform = await getReposBySegmentGroupedByPlatform(qx, segmentId, true) | ||
|
|
||
| // Transform to include normalized URLs and labels | ||
| const result: Record<string, Array<{ url: string; label: string }>> = {} | ||
| // Transform to include URLs, labels, and enabled status | ||
| const result: Record<string, Array<{ url: string; label: string; enabled: boolean }>> = {} | ||
|
|
||
| for (const [platform, urls] of Object.entries(reposByPlatform)) { | ||
| result[platform] = urls.map((url) => ({ | ||
| url: normalizeRepoUrl(url), | ||
| label: extractLabelFromUrl(url), | ||
| for (const [platform, repos] of Object.entries(reposByPlatform)) { | ||
| result[platform] = repos.map((repo) => ({ | ||
| url: repo.url, | ||
| label: extractLabelFromUrl(repo.url), | ||
| enabled: repo.enabled, | ||
| })) | ||
| } | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbani01 just to double check, we don't need to re-update the insightsProject anymore here ? the data is already synced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we don't need to re-update repositories, since the enabled is field in public.repositories is by default set to true