Skip to content

[Feature] Add Support for New Git Providers β€” Bitbucket, Azure DevOps & MoreΒ #5

@umesh-saini

Description

@umesh-saini

🌐 Feature: Multi-Provider Support

Current State

DevSwitch currently supports GitHub and GitLab as Git providers.
Users working with other platforms have to manage their SSH config manually,
which defeats the purpose of DevSwitch.

Proposed Solution

Add support for additional Git providers so users can link profiles to any
platform they use.

Providers to Add

Provider SSH Host OAuth Available
Bitbucket bitbucket.org βœ… Yes
Azure DevOps ssh.dev.azure.com βœ… Yes
Gitea (self-hosted) custom host βœ… Yes
Sourcehut git.sr.ht ❌ No
Custom / Other user-defined host ❌ No

What Needs to Be Done

Core (required for any new provider):

  • Add a provider field to the profile data model (electron/type/profile.ts)
  • Add provider selector UI on the Create/Edit Profile page
  • Map each provider to its correct SSH hostname for config generation
  • Update SSH config host alias format per provider
    (e.g. bitbucket.org-username, ssh.dev.azure.com-username)
  • Update profile card UI to show provider badge/icon

Bitbucket specific:

  • Implement Bitbucket OAuth 2.0 flow
  • Add Bitbucket API call to upload SSH public key to account
  • Handle Bitbucket's SSH key API endpoint

Azure DevOps specific:

  • Implement Azure OAuth flow (uses Microsoft identity platform)
  • Add Azure DevOps API call to upload SSH key
  • Handle Azure's unique SSH host format ssh.dev.azure.com
  • Support org-level SSH config (Azure uses v3/org in SSH path)

Gitea specific:

  • Allow user to enter a custom self-hosted Gitea instance URL
  • Implement Gitea API for SSH key upload (Gitea has a REST API)

Custom Provider:

  • Allow user to type any hostname manually
  • No OAuth for custom β€” manual SSH key copy only

Tech Notes

  • OAuth flow reference: see how GitHub OAuth is implemented in
    electron/main.ts and electron/services/
  • SSH config generation is in electron/services/sshConfigService.ts
  • Profile type is in electron/type/profile.ts
  • Each provider's OAuth app credentials will need to be added to .env.example

Good Starting Point

Bitbucket is the easiest to start with β€” it has a clean OAuth 2.0 flow
and a simple REST API for SSH keys. Recommended as a first PR for this feature.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions