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.
Next, you need a personal access token from GitHub. Go to your personal access tokens settings in GitHub. Click Generate new token, give it a name, select the required scopes (at minimum
repofor private repositories orpublic_repofor public repositories), and copy the value of the newly created token.Back in PostHog, paste the personal access token in the
Personal access tokenfield and enter the repository in the formatowner/repo(e.g.,posthog/posthog). Click Next.On the next page, 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.