feat(github): warn when adding a repo already scoped on another connection - #9034
Open
mfrancisc wants to merge 1 commit into
Open
feat(github): warn when adding a repo already scoped on another connection#9034mfrancisc wants to merge 1 commit into
mfrancisc wants to merge 1 commit into
Conversation
…ction Add a scoped GET /plugins/github/scope-duplicates API and a dismissible Config-UI Alert so users are informed before creating cross-connection duplicate domain records (apache#8947). Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #8947
When the same GitHub repository is added under more than one connection, DevLake stores duplicate domain-layer records and metrics get inflated. The Config UI previously allowed this with no warning.
This PR adds:
GET /plugins/github/scope-duplicates— diagnostics (repos already on multiple connections) and a pre-add check (connectionId+githubIds)Save is still allowed; users can choose to proceed intentionally.
Screenshot
Follow-ups
GET /api/scope-duplicatesaggregator