Skip to content

[Feat] Remove configuration for every source-control provider - #1119

Merged
brunobergher merged 4 commits into
developfrom
feature/source-control-clear-config-0xrpn6ri8rlvm
Aug 5, 2026
Merged

[Feat] Remove configuration for every source-control provider#1119
brunobergher merged 4 commits into
developfrom
feature/source-control-clear-config-0xrpn6ri8rlvm

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Replaced the GitHub-only removal mutation with admin-only sourceControl.clearConfig({ provider }) support for every source-control provider.
  • Added best-effort provider hook cleanup, encrypted OAuth connection and cache cleanup, repository deactivation, structured warnings, and exact persisted Azure DevOps delegated-account unlinking.
  • Coordinated OAuth deletion with in-flight GitLab, Gitea, and Bitbucket token refreshes so stale refresh work cannot recreate a removed credential.
  • Extended Source Control settings with provider-aware Remove actions, confirmation copy, warning display, and relevant query invalidation while keeping runtime-only configuration untouched.

Why this change was made

GitLab, Gitea, Bitbucket, and Azure DevOps could be configured in Roomote but lacked the complete local disconnect flow already available for GitHub. This makes provider setup and removal behavior consistent without deleting repository history or modifying deployment runtime variables.

Impact

Admins can safely remove persisted configuration for any source-control provider. External hook failures are reported without blocking local cleanup, repository rows and mappings remain available as inactive history, runtime-only providers remain connected, and concurrent token refreshes cannot restore removed OAuth secrets. Browser screenshots are omitted because the seeded development environment had no persisted non-GitHub provider configuration from which to open the removal dialogs without creating external OAuth state.

@roomote-community

roomote-community Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • packages/{gitlab,gitea,bitbucket}/src/oauth.ts:102-113 Concurrent token refreshes can recreate an OAuth connection after Remove deletes it. An in-flight refresh continues to writeConnection(next) after the deletion clears refreshPromise, leaving the supposedly removed provider credential persisted and usable. Coordinate deletion with refreshes or prevent stale refresh writes.

Reviewed cab6885

@roomote-roomote

roomote-roomote Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the OAuth refresh race and resolved the develop conflict in cab6885. Provider removal now waits for active refresh work and invalidates stale refresh generations before deleting the encrypted connection. Added deterministic concurrency coverage for GitLab, Gitea, and Bitbucket; targeted tests and the full pre-push checks pass. See task.

@brunobergher
brunobergher marked this pull request as ready for review August 5, 2026 16:16
@brunobergher
brunobergher merged commit 6011420 into develop Aug 5, 2026
18 checks passed
@brunobergher
brunobergher deleted the feature/source-control-clear-config-0xrpn6ri8rlvm branch August 5, 2026 16:28
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.

2 participants