Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(signals): hide github sources from manual onboarding (#123480)

Georgiy Tarasovb777cc751c38
diff --git a/products/signals/frontend/inbox/utils/inboxSetup.test.ts b/products/signals/frontend/inbox/utils/inboxSetup.test.ts
index a25f41b7549e..2b782966131c 100644
--- a/products/signals/frontend/inbox/utils/inboxSetup.test.ts
+++ b/products/signals/frontend/inbox/utils/inboxSetup.test.ts
@@ -49,21 +49,23 @@ describe('Inbox setup defaults', () => {
expect(draft.implementation_priority).toBe('P1')
})
- it('uses connected warehouse sources before a signal config exists, without confusing GitHub code access with issue sync', () => {
+ it('uses connected warehouse sources before a signal config exists and points to missing tables', () => {
const sources = setupSources([], {}, 0, {}, false, [
{ id: 'linear-source', source_type: 'Linear', schemas: [{ name: 'issues' }] },
+ { id: 'github-source', source_type: 'Github', schemas: [{ name: 'issues' }] },
])
expect(newInboxSetupDraft(sources, []).sources).toEqual([
{ source_product: 'linear', source_type: 'issue', enabled: true },
])
- expect(sources.find((source) => source.definition.source === 'github')?.available).toBe(false)
- expect(sources.some((source) => source.definition.source === 'pganalyze')).toBe(false)
+ for (const excluded of ['pganalyze', 'github', 'engineering_analytics']) {
+ expect(sources.some((source) => source.definition.source === excluded)).toBe(false)
+ }
const missingTables = setupSources([], {}, 0, {}, false, [
- { id: 'github-source', source_type: 'Github', schemas: [] },
+ { id: 'linear-source', source_type: 'Linear', schemas: [] },
])
- const github = missingTables.find((source) => source.definition.source === 'github')
- expect(github?.available).toBe(false)
- expect(github?.setupUrl).toContain('github-source')
+ const linear = missingTables.find((source) => source.definition.source === 'linear')
+ expect(linear?.available).toBe(false)
+ expect(linear?.setupUrl).toContain('linear-source')
expect(newInboxSetupDraft(missingTables, []).sources).toEqual([])
})
diff --git a/products/signals/frontend/inbox/utils/inboxSetup.ts b/products/signals/frontend/inbox/utils/inboxSetup.ts
index 6c4bafc6e92a..345275cc3368 100644
--- a/products/signals/frontend/inbox/utils/inboxSetup.ts
+++ b/products/signals/frontend/inbox/utils/inboxSetup.ts
@@ -36,6 +36,8 @@ const SOURCE_TYPES: Partial<Record<string, InboxOnboardingSourceApi['source_type
],
}
+const SOURCES_EXCLUDED_FROM_SETUP: ReadonlySet<string> = new Set(['pganalyze', 'github', 'engineering_analytics'])
+
export function setupSources(
configs: SignalSourceConfig[],
statuses: Partial<Record<string, SourceProductStatus>>,
@@ -47,7 +49,9 @@ export function setupSources(
return AGENT_ROSTER_GROUPS.flatMap((group) => group.agents)
.filter(
(definition) =>
- !definition.legacy && definition.source !== 'pganalyze' && (!definition.flag || flags[definition.flag])
+ !definition.legacy &&
+ !SOURCES_EXCLUDED_FROM_SETUP.has(definition.source) &&
+ (!definition.flag || flags[definition.flag])
)
.map((definition) => {
const existing = configs.filter((config) => config.source_product === definition.sourceProduct)