Skip to main content
The GitHub live data source reads one GitHub repository. Lightdash turns each query into a GitHub search or contributor statistics request and shows what GitHub returns. Repository data stays in GitHub. It’s a level 2 integration: its API filters records and reports a total, but doesn’t group.

Before you start

  • Live data sources enabled for your organization. See Live data sources.
  • Admin role in the Lightdash project.
  • A fine-grained personal access token for the repository, with read access to Metadata, Issues and Pull requests. Create it in your GitHub Settings → Developer settings → Personal access tokens.

Connect GitHub

  1. On the nav bar, click Browse → Semantic Layer.
  2. In the sidebar, select Live data sources, then click Add.
  3. Select GitHub.
  4. Enter a Name, such as GitHub. People see this name in Explore and agents use it to refer to the source.
  5. Enter the Repository as owner/name, or paste its GitHub URL, and the Personal access token, then click Test access.
  6. Click Add source.
Lightdash adds three tables to Explore: Pull requests, Issues and Contributors. Lightdash sets the source’s explore prefix from its name.

Dimensions and metrics

Pull requests and Issues share these dimensions: Pull requests also have Draft and Merged. Issues also have State reason: completed, not_planned or reopened. Both tables have one metric, Count, taken from the total GitHub reports for the filters. Contributors reads commit statistics for the repository’s default branch: GitHub reports its top contributors only. When GitHub is still computing the statistics, Lightdash retries a few times, then asks you to try again.

Supported features

Limits

When a query matches more than 999 items, Lightdash shows an error rather than a partial result. Add a filter, such as a date range.

Example questions

  • “How many pull requests were merged last month?”
  • “Open issues with the bug label, newest first.”
  • “Commits per author over the last 12 weeks.”

Troubleshooting

GitHub rejected the token. Create a new personal access token and update the source. GitHub can’t read the repository. Check the repository name, and that the token has read access to Metadata, Issues and Pull requests for it. GitHub couldn’t run this search. Check the filter values.