Skip to main content
The GitHub integration lets Squasher open a pull request with a fix for an issue, and lets the Squasher Agent review your pull requests. You install the Squasher AI GitHub App, then link one or more repositories to a Squasher project.

What you need

  • Permission to install GitHub Apps on the GitHub account or organization that owns the repositories.
  • The owner, admin, or security admin role in the Squasher organization.
  • The Team plan or above, to open fix pull requests. See Auto-fix.

Connect GitHub

  1. Open your project and select Settings in the sidebar, then the Integrations tab.
  2. On the GitHub card, select Connect. GitHub opens the Squasher AI app.
  3. Choose the account and the repositories that Squasher may use, then select Install.
  4. Back in Squasher, the Choose repositories dialog opens. Search for a repository and select Add. Add every repository that the project deploys from, for example the web app, the API, and the infrastructure code. Each repository’s default branch becomes its base branch for fix pull requests.
The first repository that you add is the Default repository. To change it, select Make default next to another repository. To add or remove repositories later, select Manage repositories on the GitHub row. To give the app access to more repositories, select Manage on GitHub.

How Squasher chooses a repository

When a project links several repositories, Squasher uses the repository that an event comes from:
  • CI failures and pull requests use the repository that sent the event. Every project in your organization that links that repository gets the event. Projects in other organizations never do.
  • By default, a CI failure opens an issue only on the project’s branch (or main or master). A failure on another branch opens no issue.
  • Suspect commits and the GitHub links on stack frames use the repository whose name appears in the stack frame paths. A frame link also uses the repository in the event’s vcs.repository.url.full attribute when the project links that repository.
  • A fix run uses the repository of the CI failure that it fixes. If that repository is no longer linked, Squasher does not start the fix.
When Squasher cannot tell, it uses the default repository.

Connect with the CLI

The CLI opens the same flow in your browser and links the repository when the install finishes. To link a repository after the app is installed, run squasher github link --project "$SQUASHER_PROJECT_ID" --repo acme/checkout-api --branch main. squasher github link sets the whole list of linked repositories. To link several repositories, pass --repo once for each repository. The first one is the default; use --default to choose another:
The GitHub API takes the same list as repositories: a list of { "repo", "branch", "primary" }, where primary marks the default repository.

What Squasher does with GitHub

The Squasher Agent reviews pull requests in linked repositories:
  • It reviews a pull request when it opens, becomes ready for review, or reopens. It reviews new commits at most once every 30 minutes.
  • It skips draft pull requests and pull requests from bots.
  • It comments only when it finds a risk to production.
  • To stop reviews, set pr_review to off. See Review pull requests.
Squasher never merges a pull request. You review and merge it in GitHub.

Limits

  • AI triage does not read your repository. A fix run clones it. A pull request review reads only the changed files of the pull request.
  • Squasher does not read GitHub deployment or workflow events. To tell Squasher about releases, see Deployments.
  • To unlink every repository, run squasher github unlink --project "$SQUASHER_PROJECT_ID". To unlink one repository, select Manage repositories on the GitHub row.

Next steps

Auto-fix

How fix runs work and what they need.

Read AI triage

The triage summary that a fix starts from.