Skip to content

GitLab integration#

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

Enabling the GitLab integration#

To enable the GitLab integration, open your repository Settings, tab Integrations. When you add a new repository, Codacy enables the integration using the default settings for your organization.

GitLab integration

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

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


    The user that enables the integration must have administrator access to the repository. Codacy uses this GitLab user to create comments on merge requests.


    Use a dedicated service account to integrate Codacy with your repositories. This prevents disruption of service if the user who originally enabled the integration loses access to the repositories, which may happen when a 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 GitLab integration#

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

Depending on the options that you enable, Codacy will automatically update merge requests on GitLab with extra information when accepting merge requests.


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

Pull Request Status#

Adds a report to your merge requests showing whether your merge requests and coverage are up to standards or not as configured on the quality gate rules for your project. You can then optionally block merging merge requests that aren't up to standards.


To get a status for coverage you must also:

Merge request status on GitLab

Pull Request Comment#

Adds comments on the lines of the merge request where Codacy finds new issues. Click on the links to open Codacy and see more details about the issues and how to fix them.

Merge request comment on GitLab

AI-Enhanced Comments#

Adds AI-enhanced comments with insights to help you fix identified issues.


  • 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. Please refer to the OpenAI API data usage policies for more information.

AI-enhanced comment on GitLab

Pull Request Summary#

Shows an overall view of the changes in the merge request, including new issues and metrics such as complexity and duplication.

Merge request summary on GitLab

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.

Edit this page on GitHub if you notice something wrong or missing.

If you have a question or need help please contact

Last modified October 23, 2023