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.

1.3 KB
Raw Blame
import { buildGithubDisconnectDescription } from './githubDisconnectCopy'

describe('buildGithubDisconnectDescription', () => {
    it.each([
        [
            'project scope, last reference',
            false,
            'project' as const,
            'This uninstalls the PostHog app from PostHog on GitHub and disconnects it from every PostHog project and personal account that uses it.',
        ],
        [
            'project scope, shared',
            true,
            'project' as const,
            'This project stops using GitHub. The PostHog app stays installed on GitHub because other projects or accounts still use it.',
        ],
        [
            'account scope, shared',
            true,
            'account' as const,
            'Your account stops using GitHub. The PostHog app stays installed on GitHub because other projects or accounts still use it.',
        ],
        [
            'account scope, last reference',
            false,
            'account' as const,
            'This uninstalls the PostHog app from PostHog on GitHub and disconnects it from every PostHog project and personal account that uses it.',
        ],
    ])('%s', (_name, installationShared, scope, expected) => {
        expect(buildGithubDisconnectDescription('PostHog', installationShared, scope)).toBe(expected)
    })
})