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

# GitHub Reporter

> See test run results on your pull requests and commits as GitHub comments and status checks you can require

The GitHub Reporter app posts test run results to your application repository: a comment on each
pull request, and a status check on each commit it tested. It needs access to checks and pull
requests only, not to your source code.

## Before you begin

The reporter posts only for runs that carry commit and branch details:

* With the [dispatch action](https://empirical.run/docs/triggers/ci-cd.md#github-actions), runs already include them.
* With the [API](https://empirical.run/docs/triggers/ci-cd.md#metadata-for-reporting), send the `build` object in the trigger request.

## Install

1. Open [Settings → Reporters](https://empirical.run/settings/reporters).
2. Click **Install** on the GitHub card.
3. Choose the repositories your runs are triggered from: the repository with the dispatch action, or
   the one named in `build.repo`.

## What it posts

### Pull request comments

Empirical keeps one comment per pull request and environment, and edits it after every run. The
comment shows the latest run with its results, up to four failed tests, any snoozed tests, and the
previous 10 runs on the branch.

![Empirical comment on a pull request with the latest run's results and failed tests](https://mintcdn.com/empirical/waQ8Gu-qy0fYzXYb/images/github-reporter/empirical-reporter-app-comments.png?fit=max\&auto=format\&n=waQ8Gu-qy0fYzXYb\&q=85\&s=3174a278f7082471541572d65e76019e)

### Status checks

Each run is a [check](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks)
named `Empirical tests - <environment>` on the commit it tested. The check updates while the run is
in progress. Its result ignores snoozed failures, so you can make it a required check.

![Empirical tests status check in the checks list of a pull request](https://mintcdn.com/empirical/waQ8Gu-qy0fYzXYb/images/github-reporter/empirical-reporter-app-checks.png?fit=max\&auto=format\&n=waQ8Gu-qy0fYzXYb\&q=85\&s=431e755943d8fdbfb241e4e3fde1bc3e)

### Linked test changes

For runs triggered by a pull request, Empirical also posts a check named
`Empirical linked test changes`. It fails until the pull request's test changes are merged. See
[Linked test changes](https://empirical.run/docs/features/linked-test-changes.md).

## Permissions

| Permission | Why Empirical needs it |
| - | - |
| Read and write access to checks | Create and update status checks |
| Read and write access to pull requests | Create and update the run comment on a pull request |


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