Merge PostHog self-hosted into a single PostHog provider

Fold POSTHOG_SELF_HOSTED into POSTHOG: one provider now covers Cloud (OAuth + region-pinned API key) and self-hosted (API key + instance URL), since both already share the driver, name resolver, and PostHogConnectorSettings{BaseURL}. The API-key form picks a deployment (Cloud US/EU or self-hosted URL); the resolver requires exactly one of region/instanceUrl.

Drop the POSTHOG_SELF_HOSTED enum value, registration, migration, and logo mapping. Extract the deployment selector into a dedicated PostHogDeploymentField component. Point the driver tests at us.posthog.com instead of the legacy app.posthog.com host.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-06-03 16:03:18 +02:00
parent 760f950a48
commit b4e6f73b78
13 changed files with 203 additions and 198 deletions

View File

@@ -92,12 +92,13 @@ type (
InstanceURL string `json:"instance_url"`
}
// PostHogConnectorSettings carries the data-API base host for both the
// cloud (POSTHOG) and self-hosted (POSTHOG_SELF_HOSTED) providers. It
// is the region-pinned host for API-key connections
// (https://us.posthog.com / https://eu.posthog.com / a self-hosted
// instance URL). It is empty for cloud OAuth connections — the driver
// then defaults to the region-agnostic gateway https://oauth.posthog.com.
// PostHogConnectorSettings carries the data-API base host for the
// PostHog provider, which spans cloud and self-hosted deployments. For
// API-key connections it is the region-pinned host
// (https://us.posthog.com / https://eu.posthog.com) or a self-hosted
// instance URL. It is empty for cloud OAuth connections — the driver
// then discovers the region (us/eu) by probing, since the
// region-agnostic oauth.posthog.com gateway does not serve the data API.
PostHogConnectorSettings struct {
BaseURL string `json:"base_url"`
}