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

# GitHub

> Connect the GitHub App for automatic PR reviews, or use GitHub Actions workflows for reviews and test plans.

QA.tech connects to GitHub in two ways. They can be used together.

| | **GitHub App** | **GitHub Actions** |
| :- | :- | :- |
| **What it does** | Automatic review when a pull request opens or updates | Workflows you add yourself |
| **Where to configure** | Install and map the repository on this page | Workflow YAML in your repo |
| **Pull request testing** | [GitHub pull request testing](https://docs.qa.tech/pr-testing/github#github-app) | [Change Review Action](https://docs.qa.tech/pr-testing/github#change-review-action) |
| **Regression testing** | Not this path | [Test Run Action](https://docs.qa.tech/regression-testing/github.md) |

This page is the install and settings reference for the GitHub App. How a review starts, what it posts, and the check it creates are on [GitHub pull request testing](https://docs.qa.tech/pr-testing/github). What a review does on every CI is on [How a review works](https://docs.qa.tech/pr-testing/overview.md#how-a-review-works).

> [card] [Pull request testing](https://docs.qa.tech/pr-testing/github)
>
> The GitHub App and the Change Review Action review a pull request.

> [card] [Regression testing](https://docs.qa.tech/regression-testing/github.md)
>
> The Test Run Action runs a test plan.

## How to Set It Up

**1. Install GitHub App**

Go to [Settings → Integrations → GitHub App](https://app.qa.tech/current-project/settings/integrations/github-app) and connect GitHub. Follow the OAuth flow to grant access to your repositories. The GitHub account is shared by every project in the organization.

**2. Configure Repository**

On the same page, select the repository you want to enable PR reviews for.
**PR reviews are enabled automatically** once you select a repository.
**Optional:** Add review context to guide the agent (e.g., "Focus on security
vulnerabilities" or "Validate accessibility standards"). This appears in the
integration settings.

**3. Code access (on by default)**

Saving a new repository mapping turns **Enable code access** on. Chat and PR
reviews can then clone and search source. Turn the toggle off if you do not
want cloning. Existing mappings created before this default stay off until you
enable them. See [Code access](#code-access).

**4. Configure Preview Deployments (if needed)**

If you use Vercel, Netlify, Render, Railway, or Fly.io, your preview
deployments are detected automatically.

> [!NOTE]
>
> QA.tech creates preview environment records in your project when it detects
> your preview deployments. Your CI/CD platform handles the actual deployment.
> QA.tech tests against the preview URLs. See [Preview
> Environments](https://docs.qa.tech/core-concepts/applications-and-environments.md#preview-environments).

**For GitHub Actions or other custom CI/CD:** QA.tech finds preview URLs
through GitHub's [Deployments
API](https://docs.github.com/en/rest/deployments/deployments). After your
workflow deploys, it must create a deployment on the PR head commit, set the
latest status to `success`, and put the preview URL in `environment_url`.
Follow [GitHub Deployments](https://docs.qa.tech/configuration/github-deployments.md) for the Actions
recipe, required fields, and permissions. Any CI that can call the GitHub REST
API can create the same records. For multiple applications per PR, map
deployment environments under [Map environments to
applications](https://docs.qa.tech/configuration/github-deployments.md#map-environments-to-applications).
Without GitHub deployments, QA.tech cannot test against PR-specific URLs and
uses your default environment.

**5. Open a pull request**

The App reviews pull requests on the mapped repository. How reviews start and what they post is on [GitHub pull request testing](https://docs.qa.tech/pr-testing/github#github-app).

## Permissions

The App needs write access to pull requests and statuses so it can post comments, the review, and the **QA.tech / PR Review** check. It only writes when tests run or when the organization is out of credits. The full list of what it posts is on [What the GitHub App posts](https://docs.qa.tech/pr-testing/github#what-the-github-app-posts).

## PR Review check on GitHub

The App registers a check run named **QA.tech / PR Review** on pull request commits. You can require it in branch protection. When the check appears for each trigger is on [PR Review check](https://docs.qa.tech/pr-testing/github#pr-review-check).

### Integration settings

Configure these under **Settings → Integrations → GitHub App** for the repository:

| Setting | Effect on the PR Review check |
| :- | :- |
| **Auto-run on PRs** | When on, creates the check on PR open/sync (subject to draft rules below). When off, no check on PR open - use `@qa.tech`, the Change Review Action, or the API. |
| **Include draft PRs** | When off (default), draft PRs get a skipped **Draft PR** check instead of an in-progress review. When on, draft PRs are reviewed the same as non-draft PRs (if auto-run is enabled). |
| **Start Before Deployment (beta)** | Off by default. When on, the review starts when the PR opens, before its preview deployment is ready: QA.tech reads the change and plans tests, then runs them once the deployment succeeds. The check stays in progress while it waits. |
| **Register a commit check** | On by default. When off, QA.tech never posts the **QA.tech / PR Review** check for any trigger (auto-run, `@qa.tech`, the Change Review Action, or the API). Reviews still post the sticky PR comment and appear in the dashboard, but there is no merge gate to require. |
| **PR Triage** | On by default for new projects and new GitHub integrations. Mappings created before that default stay off until you turn them on. When on, automatic reviews skip pull requests that cannot be tested. The check is set to skipped with a **Review skipped** reason, and QA.tech does not comment on the pull request. `@qa.tech` comments and re-runs are never skipped. Use **PR triage prompt** to say which pull requests to skip. [Suggested workflows](https://docs.qa.tech/pr-testing/pr-triage.md) are copy-paste prompts. |

## Code access

Code access is **on by default** for new GitHub App repository mappings. When it is on, chat and PR reviews can clone repositories the GitHub App can access and search source when the knowledge graph or a PR diff is not enough.

If you mapped a repository before this default, turn on **Enable code access** on the same page. You can turn it off at any time.

### Enable or disable code access

**1. Map a GitHub repository**

Under [**Settings → Integrations → GitHub
App**](https://app.qa.tech/current-project/settings/integrations?focus=github-app),
select a repository and click **Save**. New mappings turn **Enable code
access** on automatically. The toggle appears after the mapping exists.

**2. Adjust Enable code access**

Use **Enable code access** to turn cloning on or off. The toggle saves
immediately; you do not need to click **Save** again.

Once enabled:

* Chat and PR reviews clone the mapped repository by default. Sibling repositories the GitHub App installation can access need no extra mapping.
* A scan of the mapped repository starts and adds a **Code gating facts (from repository)** item to **Settings → Knowledge → Library** (auth classes, feature/plan flags, and setup preconditions). Scan status appears under the toggle. Use **Scan** or **Re-scan** to run it again, or **View in library** to open the item.
* Source search is available in the [AI Chat Assistant](https://docs.qa.tech/core-concepts/ai-chat-assistant.md) and during PR reviews.

The GitHub App must have access to each repository you want cloned.

Turn **Enable code access** off to stop cloning. Knowledge items already in the library stay until you remove them.

### Logic Verification (beta)

**Logic Verification (beta)** is on the same repository mapping, under **Code Access**. The switch is shown only while **Code Access** is on.

On pull requests that change rule-heavy logic (dates, money, permissions, limits), the review also models that logic from source and checks it with a solver. Those reviews can take a few minutes longer. Reviews run this check only when **Code Access** is on for that repository.

## Troubleshooting

**PR reviews aren't posting**

* Verify the GitHub App is installed and has access to the repository.
* Check that the repository is selected under **Settings → Integrations → GitHub App**.
* With **PR Triage** on, pull requests that cannot be tested are skipped. The **QA.tech / PR Review** check shows **Review skipped** and the reason. Comment `@qa.tech` to run a review anyway.
* A 403 Forbidden means the App lacks write access to pull requests or statuses. See [Permissions](#permissions).

**Tests run against the wrong URL**

* Map each GitHub environment name to an application under **Settings → Integrations → GitHub App → GitHub Environments**. See [Map environments to applications](https://docs.qa.tech/configuration/github-deployments.md#map-environments-to-applications).
* With **GitHub Environments** empty and no applications selected, every successful deployment is tested as the project's default application.
* With **GitHub Environments** empty and one application selected, every successful deployment is tested as that application, including Storybook and docs previews.
* With **GitHub Environments** empty and more than one application selected, every successful deployment is attached to one application: the project default when it is selected, otherwise the first selected application. Only that application receives a preview URL.
* A host that loads and a host that returns 403 can both be offered to that application. Pass the URL to test from the [Change Review Action](https://docs.qa.tech/pr-testing/github#change-review-action).
* Verify your CI creates GitHub deployment records with `environment_url` set to the preview URL. See [GitHub Deployments](https://docs.qa.tech/configuration/github-deployments.md).
* Check that environment names match between GitHub and QA.tech.

**Chat or reviews cannot search source code**

Turn on **Enable code access** under **Settings → Integrations → GitHub App**. See [Code access](#code-access).

## Related documentation

* **[GitHub pull request testing](https://docs.qa.tech/pr-testing/github)** - Start reviews from the App, the Change Review Action, after merge, or for a mobile build
* **[GitHub regression testing](https://docs.qa.tech/regression-testing/github.md)** - Run a test plan from GitHub Actions
* **[GitHub Deployments](https://docs.qa.tech/configuration/github-deployments.md)** - Publish preview URLs from GitHub Actions for automatic PR reviews
* **[AI Chat Assistant](https://docs.qa.tech/core-concepts/ai-chat-assistant.md)** - Source search in chat when code access is enabled
* **[Knowledge](https://docs.qa.tech/core-concepts/knowledge.md)** - Library item created by the code access scan


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.