Linking GitHub as a source
The GitHub connector can link issues, pull requests, commits, stargazers, and releases to PostHog.
To link GitHub:
Go to the sources tab of the data pipeline section in PostHog.
Click + New source and then click Link next to GitHub.
Select your Authentication type. OAuth is the default and recommended method:
OAuth (GitHub App) – Click the GitHub account field and follow the prompts to connect your GitHub account. This handles authentication automatically.
Personal access token (PAT) – If you prefer using a PAT, select this option. Go to your personal access tokens settings in GitHub, click Generate new token, give it a name, select the required scopes (
repofor private repositories orpublic_repofor public repositories), and paste the token into PostHog.
Enter the repository you want to sync in the format
owner/repo(e.g.,posthog/posthog). Click Next.Set up the schemas you want to sync and modify the method and frequency as needed. Once done, click Import.
Once the syncs are complete, you can start using GitHub data in PostHog.
Note: The issues table includes pull requests as GitHub's API considers every pull request an issue. You can identify pull requests by the
pull_requestfield.