Skip to main content

GitHub integration

The GitHub integration incorporates Codacy on your existing Git provider workflows by reporting issues and the analysis status directly on your pull requests.

When you add a new repository, Codacy sets the GitHub integration using the default settings for your organization. You can then customize the settings for the repository.

GitHub integration

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.

tip

You can apply the default Git provider integration settings to all repositories to ensure that your repositories all share the same settings.

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 gate rules for your repository. You can then optionally block merging pull requests that aren't up to standards.

caution

To get a status for coverage you must also:

Pull request status check on GitHub

AI Reviewer

note

This feature is only supported on GitHub.

If you choose to enable the AI Reviewer, consider disabling the AI-enhanced comments, as it may duplicate any comments on Codacy issues you receive.

The AI Reviewer combines the reliability of deterministic, rule-based static code analysis with the power of AI. It draws in the necessary context from source code and PR metadata to ensure the business intent matches the technical outcome, and can catch logic gaps that conventional scanners (and human reviewers) often miss.

It provides feedback on missing or weak tests, complex or duplicated code, and keeps security concerns up to date. Beyond that, it adds contextual insights about whether the changes follow the requirements, business rules, and logic used in the project.

This setting can be enabled at a repository or organization level. Once enabled, Codacy will start adding a Summary to your pull requests based on the AI-enriched reviews. To request a PR Review from Codacy, add a codacy-review label to your Pull Request. Codacy listens to the event and will publish the review as soon as it's ready.

AI Reviewer on Github

Issue 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.

Issue annotation on GitHub

Issue summaries

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.

Issue summary on GitHub

Coverage summaries

Adds a pull request comment showing an overall view of the coverage metrics for the pull request, including details about the data that Codacy used to calculate the coverage variation and diff coverage metrics.

When there are new coverage results, Codacy updates the last coverage summary comment if it's included in the last 5 comments of the pull request. Otherwise, Codacy creates a new comment.

caution

To get coverage summaries you must also add coverage to your repository.

Coverage summary on GitHub

note

This feature is only supported on GitHub and GitLab Cloud.

Suggested fixes

Paid plans

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.

tip

Enable also AI-enhanced comments to get ready-to-commit AI-generated fixes.

Comment suggesting a fix on GitHub

AI-enhanced comments

Adds AI-enhanced comments, providing insights and ready-to-commit AI-generated fixes for identified issues in cases where tool-suggested fixes are not supported. To enable this option, you must enable Suggested fixes first.

note
  • This feature is compatible with most programming languages and requires no additional setup.
  • Comments are generated using the description of the static analysis issue, information about the tool that detected the issue, and a few lines of surrounding code to provide the AI with extra context and improve its accuracy.
  • This feature leverages the OpenAI API. No information is shared with other third parties or used to train AI models. Refer to the OpenAI API data usage policies for more information.

AI-enhanced comment on GitHub

See also