Skip to content

Conversation

@mbani01
Copy link
Contributor

@mbani01 mbani01 commented Feb 3, 2026

This pull request updates the repository mapping functionality to include the source platform information for integrations. The main changes add a new sourcePlatform field to the repository mapping interface and update the database query to fetch this information.

Enhancements to repository mapping:

  • Added a new sourcePlatform field to the IRepositoryMapping interface in index.ts to store the platform type of the source integration.
  • Updated the SQL query in getIntegrationReposMapping to join the integrations table and select the platform field as sourcePlatform, 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 IRepositoryMapping fields or handling sourcePlatform/nulls incorrectly due to the new join.

Overview
getIntegrationReposMapping now returns the source integration platform by adding sourcePlatform to IRepositoryMapping and selecting integrations.platform via a LEFT JOIN on sourceIntegrationId.

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.

@mbani01 mbani01 requested a review from emlimlf February 3, 2026 13:03
@mbani01 mbani01 self-assigned this Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

}
gitIntegrationId: string
sourceIntegrationId: string
sourcePlatform: string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interface type doesn't match nullable SQL LEFT JOIN result

Medium Severity

The sourcePlatform field is typed as string in the IRepositoryMapping interface, but the SQL query uses a LEFT JOIN on the integrations table. When a repository matches via gitIntegrationId but has no matching sourceIntegrationId in the integrations table, i.platform will be NULL. Consuming code relying on sourcePlatform being a non-null string could fail at runtime or behave incorrectly when it receives null.

Additional Locations (1)

Fix in Cursor Fix in Web

@mbani01 mbani01 merged commit 70b996d into main Feb 3, 2026
18 checks passed
@mbani01 mbani01 deleted the feat/add_sourcePlatform_in_mapped_repos_endpoint branch February 3, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants