Skip to content

feat(github): warn when adding a repo already scoped on another connection - #9034

Open
mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:upstream/feat-8947-scope-duplicates
Open

feat(github): warn when adding a repo already scoped on another connection#9034
mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:upstream/feat-8947-scope-duplicates

Conversation

@mfrancisc

Copy link
Copy Markdown
Contributor

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)
  • A dismissible, non-blocking warning in Config-UI when selecting a GitHub repo that already exists under another connection
    Save is still allowed; users can choose to proceed intentionally.

Screenshot

image

Follow-ups

  • Same API + Config-UI warning for GitLab and Bitbucket
  • Optional global GET /api/scope-duplicates aggregator
  • Domain-layer dedup / metric fixes remain out of scope

…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>
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.

[Bug][Config-UI] No warning when the same repository is added under multiple connections, causing duplicate domain-layer records

1 participant