Skip to content

Expose remaining core-gitlens provider surface needed for Kepler ProviderBackend contract #5438

Description

@julianmesa-gitkraken

Context

The multi-account/core-gitlens branch now exposes the basic surface needed for Kepler to consume multiple simultaneous connections per provider:

  • IntegrationService.getConfigured(...) returns all connections with stable id, primary, type, accountName.
  • IntegrationService.setPrimaryConnection(providerId, connectionId) changes the default connection.
  • IntegrationService.connectSecondary(providerId) adds a new connection and returns whether a new id appeared.
  • IntegrationService.deleteConnection(providerId, connectionId) removes a single connection.
  • searchMyIssues(..., connectionId) / searchMyPullRequests(..., connectionId) allow reads from a non-primary account.

This is enough for Kepler to implement the multi-account part of its ProviderBackend contract.

Problem

The full Kepler ProviderBackend contract is broader than the current multi-account surface. To switch Kepler completely from the gkcli backend to the core-gitlens backend, several additional surfaces are still required. These are the gaps that need to be filled in GitLens/core-gitlens so that src/backend/provider/core-gitlens-adapter.ts in Kepler can stop falling back to gkcli.

Missing surfaces

Surface Why it is needed for Kepler Current core-gitlens state
Closed/merged PR sweep Kepler feeds Kanban/done columns with sweepClosedPullRequests, equivalent to gk pr list --closed --with-branches --all-pages. No explicit public API that returns all-pages closed PRs with connectionId.
Pagination / all-pages / warnings model Kepler returns { items, page, hasMore, warnings, fetchFailed } per provider. Reads return arrays, not a paginated/warning wrapper compatible with Kepler.
includeAllAssignees / broaden issues Kepler distinguishes "assigned to me" vs "all visible" vs org-scoped broadening. Not exposed uniformly across issue providers.
Generic org discovery ProviderBackend.listOrgs() for all providers. Exists only for some issue providers (Jira/Azure), not a public generic API.
Generic project discovery ProviderBackend.listProjects({ providerId, org }). Same as above; not available for all providers with a stable public shape.
Generic repo discovery ProviderBackend.listRepos({ providerId, org, project }). Not exposed as a public, generic, account-scoped API.
Repository resolution ProviderBackend.resolveRepository({ providerId, remoteUrl, host }). No public equivalent to gk repo resolve.
Trello integration Kepler treats Trello as an issue-capable provider. Trello is metadata-only in core-gitlens; no real auth/issue-fetch API.
Provider warning/error model Kepler needs per-provider warnings for auth recovery/truncation. Not exposed in the public API.

Suggested acceptance criteria

  1. core-gitlens-adapter in Kepler can implement ProviderBackend.listOrgs, listProjects, listRepos, resolveRepository, sweepClosedPullRequests, broadenIssues, and the paginated read methods without shelling out to gkcli.
  2. Reads return a paginated wrapper that includes page, hasMore, and per-provider warnings.
  3. All read methods accept connectionId (non-primary account) consistently.
  4. Trello either becomes a real core-gitlens integration or is explicitly documented as unsupported.

Related

  • Kepler ProviderBackend interface: kepler/src/backend/provider/provider-backend.ts
  • Kepler core-gitlens-adapter stub: kepler/src/backend/provider/core-gitlens-adapter.ts
  • Kepler gkcli-adapter reference implementation: kepler/src/backend/provider/gkcli-adapter.ts
  • GitLens multi-account service: packages/plus/integrations/src/integrationService.ts

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions