> For the complete documentation index, see [llms.txt](https://docs.currents.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.currents.dev/resources/integrations/github/github-app.md).

# GitHub App

Cypress and Playwright GitHub App integration for Currents dashboard

Currents integration with GitHub allows posting results of your Playwright and Cypress tests as:

* [Commit status checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks) and / or
* Pull Request comment

### Activating GitHub Integration

To set up an integration:

* Open your project settings s**elect a Project > Settings > Integrations**
* Click “Connect” in the “Connect your GitHub repositories” section.

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2F7spWG3xJHBwPf2al6Glw%2Fcurrents-2025-02-21-12.03.14%402x.png?alt=media&amp;token=226d2a1b-9d3f-40fe-a9bb-75ca4badbb47" alt=""><figcaption><p>Creating a new Currents integrations with GitHub</p></figcaption></figure>

Your browser will be redirected to GitHub. Approve the new installation for [currents-bot](https://github.com/apps/currents-bot) or request an approval from your GitHub organization admin.

{% hint style="success" %}
Currents **doesn't** have access to the source code 🙈

We only user the following permissions:

* read and write to issues (for posting PR comments)
* read and write to Pull Requests (for posting PR comments)
* read and write to commit statuses (for posting commit status updates)
  {% endhint %}

After approving the installation you'll be able to see the list of repositories. To finish the setup select a repository and click “Save” to reveal the integration settings (see below).

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FSTxxX46lFkdqG8JNCjxM%2Fcurrents-2025-02-21-12.39.12%402x.png?alt=media&amp;token=d55a8192-d699-49f0-b4c2-1304599e6eec" alt=""><figcaption><p>Selecting repository for GitHub integration with Currents</p></figcaption></figure>

#### Connecting multiple GitHub organizations

You can have multiple GitHub organizations connected to Currents. Click **+ Add Installation** to restart the approval process for a new organization.

After the new approval is complete, you will be able to switch the GitHub organizations and select a new repository.

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FeaLf0pNoxsBsJfcxjWCB%2Fcurrents-2025-02-21-12.40.20%402x.png?alt=media&amp;token=f14b4394-b5cc-4233-a788-0b54af2cb685" alt=""><figcaption><p>Switching GitHub Organizations</p></figcaption></figure>

### Deactivating GitHub Integration

To detach a repository from a project, navigate to **Project Settings > Integration > GitHub** and click “Disconnect Repository”.

To completely remove GitHub integration open **Project Settings > Integration > GitHub > Configure** and then uninstall “currents-bot” Github App. Uninstalling the app will automatically detach all the projects from their respective repositories.

## GitHub Integration Settings

### PR Comments

With **Enable PR Comment** on, Currents posts one comment on the pull request that the run's commit belongs to. The comment appears when the run starts and is edited as its groups finish, so it shows the run in progress and then its result.

The comment shows:

* The run status, the test counts, the duration and the commit, with a link to the run
* A table of the run's groups with their status and test counts, up to 10 groups
* Up to 10 failed tests, each with its spec, groups, failed attempt and first error line, and up to 5 flaky tests in a collapsed list
* A **Fix with AI** section, when the run failed, was cancelled or timed out

#### Fix with AI

The **Fix with AI** section gives the failure to a person and to an agent:

* **For you:** a link to the failure context page, a [Fix link](/ai/agentic-testing/fix-failing-tests.md#share-a-fix-link). With context links off, a link to the run in Currents.
* **For your agent:** a one-line prompt to paste. It names the Markdown version of the Fix link, which any agent that can fetch a URL reads. With context links off, it names the run ID, for an agent connected to the [Currents MCP server](/ai/connect.md).
* The full prompt with the failure context, collapsed.
* When the Fix link expires, or "Context links are off".

See [Fix failing CI tests](/ai/agentic-testing/fix-failing-tests.md).

#### Context Links

**Enable Context Links** sets whether the comment includes a Fix link. It is on by default. **Link expiry** sets how long the link and the files it points to stay open: 1, 3 or 7 days, 1 by default. Turning the setting off stops new links; links already posted keep working until they expire.

The organization's **Public share links** setting turns off share links everywhere, in this comment too. See [Share links](/ai/reference/share-links.md).

#### Only Failed Runs

With **Only Failed Runs** on, a run without failures does not start a comment. When the pull request already has a comment from an earlier run, a run without failures still updates it, so the comment does not keep showing a failure that a later run fixed. With **Keep Old Results** also on, it updates only a comment that shows a failure.

#### Keep Old Results

The runs of one project on a pull request share one comment. The run that started last owns it, and an earlier run that finishes later does not overwrite it. With **Keep Old Results** on, each run posts its own comment and leaves the comments of earlier runs in place.

#### Post Error Details on Spec Files

With **Post Error Details on Spec Files** on, Currents also adds review comments on the failing spec files in the pull request diff, with the error details and a Fix with AI link.

### Commit Status Checks

Enabling Commit Status checks will trigger updates for the associated commit - the status depends on the outcomes of your run:

* “Pending” for on-going runs
* “Failed” for failed or timed out runs
* “Passed” for successful runs

![GitHub Integration - commit status check example](https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FumLMY4Lx6QzOZOo17j3x%2Fgithub-commit-status.gif?alt=media\&token=b440a784-dad9-4843-9a6b-46bb4cbe60f1)

#### Commit Status Label

Set the commit status label to distinguish the GitHub status checks one from another. For example, when multiple Current Dashboard projects are connected to the same repository, setting the Commit Status label will conveniently display the status check for each project separately.

{% hint style="warning" %}
Using the same status label for the same repo across different projects can create a conflict - runs from both projects will overwrite the associated status check item.
{% endhint %}

#### Run one check per framework

If you are reporting tests from multiple frameworks in the same job, you can enable this option to make sure the commit status check has a prefix with the framework label. This will guarantee that each testing framework gets their own status check.

{% hint style="warning" %}
Make sure to update any repository rules that makes it mandatory for the commit status check to pass, as enabling this option will change the commit status title.
{% endhint %}

#### Grouping commit status event into a single comment

Single Notification for all groups (Optional) – enabling will update GitHub commit status once per run event, regardless of the number of groups.

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2Ff2H3FD6Tqs69BlCjp1nI%2Fimage.png?alt=media&amp;token=e0353675-f7ae-4f3d-9112-4cdc4d47ec4c" alt=""><figcaption><p>Single notification for all groups</p></figcaption></figure>

### Troubleshooting GitHub Integration

Commit information must be available for GitHub integrations (PR comments, commit status updates). See [Commit Information](/dashboard/runs/commit-information.md).

* To expose your git information, please make sure that `.git` directory is present in your CI environment
* You can explicitly provide git information via environment variables

```
branch: COMMIT_INFO_BRANCH
message: COMMIT_INFO_MESSAGE
email: COMMIT_INFO_EMAIL
author: COMMIT_INFO_AUTHOR
sha: COMMIT_INFO_SHA
timestamp: COMMIT_INFO_TIMESTAMP
remote: COMMIT_INFO_REMOTE
```

#### I have enabled GitHub integration, but nothing appears in GitHub

Behind the scenes, Currents is using git commit data to identify the PR (issue) to comment on.

The simplified flow is:

1. Get the list of pull requests associated with the commit using an API call: `'GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls',`
2. Select a PR with HEAD commit matching the reported commit sha

Sometimes the commit SHA reported for a run is different from PR's HEAD commit - our integration would not be able to detect the Pull Requests and won't post a comment and status checks.

Please contact our support via in-app chat and share:

* Run that is affected
* Commit sha of the affected run
* HEAD commit sha of the associated Pull Request

Read more about [Commit data for GitHub Actions](/getting-started/ci-setup/github-actions/commit-data-for-github-actions.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.currents.dev/resources/integrations/github/github-app.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
