Skip to content

Latest commit

 

History

History
110 lines (64 loc) · 5.73 KB

File metadata and controls

110 lines (64 loc) · 5.73 KB
description Enable the GitHub integration to have status checks, annotations, issue and coverage summaries, and suggested fixes from Codacy directly on pull requests.

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 {: id="configuring"}

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.

{% include-markdown "../../assets/includes/default-git-provider-settings-tip.md" start="" end="" %}

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.

{% include-markdown "../../assets/includes/status-checks-important.md" %}

Pull request status check on GitHub

AI Reviewer

{% include-markdown "../../assets/includes/paid.md" start="" end="" %}

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

!!! tip Improve the AI Reviewer results by providing custom instructions. Learn how to do it here.

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.

!!! important 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 {: id="suggest-fixes"}

{% include-markdown "../../assets/includes/paid.md" start="" end="" %}

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.

{% include-markdown "../../assets/includes/ai-info.md" %}

AI-enhanced comment on GitHub

See also