# How to Connect GitHub to Lookout


{{< customreadfile "/includes/lookout/beta-callout.md" >}}

Connecting GitHub gives the agent one more place to look when it is working out what your data means: the code that produces it.

{{< info >}}
The GitHub connection is **read-only**. Lookout reads your repositories for context. It cannot open pull requests, create branches, commit, or leave review comments — there is no tool for any of that.
{{< /info >}}

## Connect GitHub

Only admins can connect GitHub. Once connected, any member can use the repository tools in chat. See [Roles and Permissions]({{< ref "lookout/workspaces/roles.md" >}}) for more details.

From **Settings** > **Connections** > **Source Control**, install the **Lookout GitHub App** and grant it access to the repositories you want Lookout to read.

Then link each repository to the warehouse it belongs to under **Settings** > **Connections** > **Warehouses**, so Lookout knows which repository describes which data. See [Link Repositories to Warehouses]({{< ref "lookout/integrations/sources.md" >}}).

## What the agent can read

- **Files and code**: Read files and search across a repository
- **History**: List commits and see what changed
- **Pull requests**: List them and read their diffs, as a record of how something came to be

Repository access is scoped to what you granted the app, and to the repositories linked in your workspace.

## Keep documentation current

When a push lands on the default branch of a linked repository, Lookout refreshes the generated documentation for that project, so what the agent reads stays in step with your code. That documentation lives in the [Context Hub]({{< ref "lookout/working-with-lookout/context-hub.md" >}}).

<br />

