: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(signals): load the github access check only when creating a pr (#125701)
Paul D'Ambra6b77f15a6e98
diff --git a/products/signals/frontend/inbox/inboxTaskKickoffLogic.ts b/products/signals/frontend/inbox/inboxTaskKickoffLogic.tsindex 1d31bb7947a5..9575d37cbece 100644--- a/products/signals/frontend/inbox/inboxTaskKickoffLogic.ts+++ b/products/signals/frontend/inbox/inboxTaskKickoffLogic.ts@@ -46,7 +46,6 @@ import {} from 'products/tasks/frontend/generated/api.schemas'import { InboxReportActionType, captureInboxReportActionCompleted } from './inboxAnalytics'-import { reportGithubAccessLogic } from './logics/reportGithubAccessLogic'import {SIGNAL_REPORT_TASK_DISCUSSION_RELATIONSHIP,SIGNAL_REPORT_TASK_IMPLEMENTATION_RELATIONSHIP,@@ -969,6 +968,16 @@ export const inboxTaskKickoffLogic = kea<inboxTaskKickoffLogicType>([}},createPrFromReport: async ({ report, feedback }) => {+ // Lazy: a static import puts the inbox setup stack in the shell bundle of every logged-in page.+ const githubAccess = await import('./logics/reportGithubAccessLogic').catch((error) => {+ handleKickoffError(error, report, 'create_pr', "Couldn't start the PR task. Try again.")+ return null+ })+ if (!githubAccess) {+ actions.createPrFailure()+ return+ }+ const { reportGithubAccessLogic } = githubAccessconst disabledReason =values.createPrDisabledReason ??(