> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub API

> List available repositories and link or unlink repositories from a Squasher project.

Use the GitHub API to connect repository context to Squasher projects for suspect commits, hosted fixes, and incident evidence.

## Operations

| Operation          | Method and path                                | Purpose                                                   |
| ------------------ | ---------------------------------------------- | --------------------------------------------------------- |
| `github.listRepos` | `GET /v1/github/repos?project_id={project_id}` | List repositories installed for the project's GitHub App. |
| `github.link`      | `PUT /v1/projects/{project_id}/github`         | Link one or more repositories to a project.               |
| `github.unlink`    | `DELETE /v1/projects/{project_id}/github`      | Unlink repositories from a project.                       |

Repository link and unlink payloads are project-scoped writes. Confirm the project id, repository names, and default branch before changing links.

## CLI and MCP

Use `squasher github repos`, `squasher github link`, or `squasher github unlink`. In MCP Code Mode, call `search("github")`; writes may require host approval.

## Agent handoff

```text theme={null}
Review GitHub repository links for Squasher project <project_id>. List repositories installed for the project's GitHub App, propose exact repo links, and ask before linking or unlinking repositories.
```

Related: [GitHub integration](/integrations/github), [AI triage](/features/ai-triage).
