Skip to content
This documentation applies to Codacy Self-hosted v7.0.0

For the latest updates and improvements, see the latest Cloud documentation instead.

GitHub integration#

The GitHub integration incorporates Codacy on your existing Git provider workflows.

When the integration is enabled, you can create pull request comments and GitHub issues directly from Codacy when browsing the existing issues on the repository:

GitHub integration for issues

Depending on the configuration of the GitHub integration, Codacy can also report and notify you about issues directly on your pull requests.

Enabling the GitHub integration#

To enable the GitHub integration, open your repository Settings, tab Integrations. When you add a new repository, the integration is already enabled by default.

GitHub integration

If you remove the integration, you can enable it again as follows:

  1. Click the button Add integration and select GitHub on the list.
  2. Click the button Enable and follow the instructions.

    Important

    The user that enables the integration must have administrator access to the repository. Codacy uses this GitHub user to suggest fixes on pull requests.

    Tip

    We recommend that you use a dedicated service account for integrating Codacy with your repositories. This will avoid disruption of service if the user who originally enabled the integration stops having access to the repository, such as when the user leaves the team or the organization.

    For more information and instructions on how to set up a dedicated service account see Why did Codacy stop commenting on pull requests?

Configuring the GitHub integration#

To configure the GitHub integration, open your repository Settings, tab Integrations.

Depending on the options that you enable, Codacy will automatically update pull requests on GitHub with extra information when accepting pull requests:

Status checks#

Adds a report to your pull requests showing whether your pull requests and coverage are up to standards or not as configured on the quality settings of your repository.

Important

To get a status for coverage you must also:

To block merging pull requests that aren't up to standards see How do I block merging pull requests using Codacy as a quality gate?

Pull request status check on GitHub

Annotations#

Adds annotations on the lines of the pull request where Codacy finds new issues. Codacy maps the severity of the issues reported by the tools to the severity levels of the annotations. To enable this option, you must enable Status checks first.

Pull request annotation on GitHub

Summary#

Shows an overall view of the changes in the pull request, including new issues and metrics such as complexity and duplication. To enable this option, you must enable Status checks first.

Pull request summary on GitHub

Suggested fixes#

Adds comments on the lines of the pull request where Codacy finds new issues with suggestions on how to fix the issues. Codacy doesn't apply any changes automatically. To apply the changes, manually review and accept the suggestions.

Comment suggesting a fix on GitHub

Note

This feature is in early access and has the following limitations for now:

  • The only supported Git providers are GitHub Cloud and GitHub Enterprise.
  • The only two tools that suggest fixes are ESLint and markdownlint. However, we're planning to support suggestions from more tools.
  • Because of a limitation from GitHub, the author of the comments suggesting fixes is the user that enabled the GitHub integration and not Codacy.

📢 Activate suggested fixes now and let us know what you think!

See also#

Share your feedback 📢

Did this page help you?

Thanks for the feedback! Is there anything else you'd like to tell us about this page?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

If you have a question or need help please contact support@codacy.com.

Last modified March 18, 2022