feat: add sourcePlatform in mappedRepos response #3821
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


This pull request updates the repository mapping functionality to include the source platform information for integrations. The main changes add a new
sourcePlatformfield to the repository mapping interface and update the database query to fetch this information.Enhancements to repository mapping:
sourcePlatformfield to theIRepositoryMappinginterface inindex.tsto store the platform type of the source integration.getIntegrationReposMappingto join theintegrationstable and select theplatformfield assourcePlatform, ensuring this data is included in the mapping results.Note
Low Risk
Small, additive response-shape change; main risk is downstream consumers expecting the previous
IRepositoryMappingfields or handlingsourcePlatform/nulls incorrectly due to the new join.Overview
getIntegrationReposMappingnow returns the source integration platform by addingsourcePlatformtoIRepositoryMappingand selectingintegrations.platformvia aLEFT JOINonsourceIntegrationId.This extends the mapped-repos response with platform metadata without changing filtering logic, but it does alter the payload shape and adds an extra join to the query.
Written by Cursor Bugbot for commit 596c500. This will update automatically on new commits. Configure here.