[Refactor] Isolate source-control provider cleanup - #1126
Draft
roomote-roomote[bot] wants to merge 1 commit into
Draft
[Refactor] Isolate source-control provider cleanup#1126roomote-roomote[bot] wants to merge 1 commit into
roomote-roomote[bot] wants to merge 1 commit into
Conversation
Contributor
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.
What changed
Extracted source-control provider removal into an exhaustive typed registry and a dedicated cleanup boundary. The registry now owns provider-specific webhook removal, OAuth and cache cleanup, legacy environment-variable aliases, GitHub disconnection, and Azure DevOps account unlinking, while the command module only performs authorization and delegates the lifecycle.
Added focused coverage for legacy alias detection and combined webhook/OAuth warning aggregation alongside the existing provider matrix, runtime-only no-op, Azure DevOps unlinking, and fatal transaction behavior.
Why this change was made
Provider removal had become a large provider-specific branch in the central source-control command module. Isolating destructive lifecycle behavior reduces branch drift and gives future providers one typed integration point for cleanup responsibilities.
Impact
There is no intended user-facing behavior change. Provider configuration removal retains its existing warning and failure semantics while becoming easier to extend and review safely.