Codecov

Code coverage done right.®

Welcome to Codecov Documentation. You'll find comprehensive guides and documentation to help you start working with Codecov as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

How to create a GitHub App Integration for Codecov Enterprise

Not Using GitHub Enterprise?

If you are not using GitHub Enterprise, you have two options:

  1. Use our Team Bot.
  2. Create this GitHub App Integration and limit it to your organization.

Creating a GitHub App Integration

Rather than using a Team Bot, a GitHub App Integration can be used in GitHub (Cloud or Enterprise) to efficiently onboard new teams to Codecov.

The App Integration will allow teams to add Codecov directly to their repositories via the GitHub user interface.

This integration is meant to be a replacement for the Team Bot for GitHub (Cloud or Enterprise). Using it will ensure that comments are posted to Pull Requests as Codecov, rather than a Team Bot user.

To create a GitHub App Integration for Codecov, first navigate to your GitHub Apps:

Choose "New GitHub App":

And fill out the relevant fields for app creation:

It's important to set the proper homepage and callback URLs. They should point to your Codecov Enterprise install as follows:

  • <your-codecov-enterprise-url>/ghe

For the web hook URL:

  • <your-codecov-enterprise-url>/webhooks/github_enterprise

You should provide a secret. Once provided, you will want to ensure that you properly provide the secret in the Codecov Enterprise codecov.yml. See:
https://docs.codecov.io/docs/manually-create-webhooks#section-github-enterprise

Permissions

The following screenshot shows all permissions needed by the app integration, as well as the relevant events. For visibility permissions with a greater setting than "No Access" have been emphasized in green.

Repository Permissions

Required repository permissions.

Required repository permissions.

Organization Permissions

Required organization permissions

Required organization permissions

User Permissions

No user permissions are required. All can be set to "No Access"

Events

Required user permissions.

Required user permissions.

Using GitHub.com?

If you're not using GitHub Enterprise, make sure that you only publish this app for your organization.

Troubleshooting

  • If you don't receive comments on Pull Requests for Repositories with the App Integration installed, visit the repo settings page for that particular repository on your Codecov Enterprise install:

For GitHub.com:
<your-codecov-enterprise-url>/gh/<org-name>/><repo-name>/settings

For GitHub Enterprise:
<your-codecov-enterprise-url>/ghe/<org-name>/><repo-name>/settings

Once there, check the "GitHub Webhook" section and press the "Create Web Hook" button if a webhook is not already set.

Updated about a month ago

How to create a GitHub App Integration for Codecov Enterprise


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.