---
title: PR Comments
description: >-
  Learn how Datadog posts automated comments on your pull requests through
  source code management integrations.
breadcrumbs: Docs > Source Code Integration > PR Comments
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# PR Comments

PR comments are automated comments added by Datadog's [source code management integrations](https://docs.datadoghq.com/source_code/source-code-management.md) to inform developers of issues detected in their code changes and, in certain cases, suggest remediation.

{% alert level="warning" %}
PR comments are not supported in pull requests in public repositories, or on pull requests targeting a destination branch in a different repository from the source branch (that is, forked repositories trying to merge into the main repository).
{% /alert %}

There is a maximum of 31 unique comments per PR at any time to reduce noise and clutter. These comments include:

- One summary comment is always posted to give a high-level view of all the issues Datadog detected in the PR. This comment is edited by Datadog as new commits pushed to the PR change the results.
- For products that post inline comments, such as Code Security, up to 30 inline comments are posted. Each one appears on the line of code that triggered a violation. If more than 30 violations are introduced in the PR's diff, the 30 highest severity violations are posted.
- Datadog posts a 👀 reaction on the description of the PR when a product that has PR comments (or [PR Gates](https://docs.datadoghq.com/pr_gates.md)) enabled is still waiting for results to arrive. After all results have arrived:
  - If all results are positive, the reaction is changed to 👍.
  - If there is at least one finding, the 👀 reaction is removed because the summary comment includes details on the findings instead.

## PR comments for CI Visibility{% #pr-comments-for-ci-visibility %}

PR comments are enabled by default when first onboarding to [CI Visibility](https://docs.datadoghq.com/continuous_integration.md) if a [source code management integration](https://docs.datadoghq.com/source_code/source-code-management.md) is installed correctly. Datadog posts a comment summarizing the failed jobs detected in your pull request.

{% image
   source="https://docs.dd-static.net/images/source_code_integration/ci-visibility-pr-comment.26c957743f628557ed4e718a7232f6fa.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/source_code_integration/ci-visibility-pr-comment.26c957743f628557ed4e718a7232f6fa.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="PR Comment summarizing failed jobs detected by CI Visibility" /%}

To disable PR comments for CI Visibility, go to the [CI Visibility Repository Settings](https://app.datadoghq.com/ci/settings/ci-visibility).

## PR comments for Code Security{% #pr-comments-for-code-security %}

PR comments are enabled by default when first onboarding to [Code Security](https://docs.datadoghq.com/security/code_security.md) if a [source code management integration](https://docs.datadoghq.com/source_code/source-code-management.md) is installed correctly. Datadog posts two types of comments on your pull requests:

1. A single comment summarizing the new violations detected in your pull request.

{% image
   source="https://docs.dd-static.net/images/source_code_integration/code-security-summary-pr-comment.1021b4cff4be204857c1654504d7855d.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/source_code_integration/code-security-summary-pr-comment.1021b4cff4be204857c1654504d7855d.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="PR Comment summarizing the new violations detected by Code Security" /%}
Inline comments for each violation detected in your pull request placed directly on the lines of code that triggered the violation in the diff of the pull request.
{% image
   source="https://docs.dd-static.net/images/source_code_integration/code-security-inline-pr-comment.f557e029fc4fdb1328a692e1a88faf31.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/source_code_integration/code-security-inline-pr-comment.f557e029fc4fdb1328a692e1a88faf31.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Inline comment for a specific violation detected by Code Security" /%}

To disable PR comments for Code Security, go to the [Code Security Repository Settings](https://app.datadoghq.com/security/configuration/code-security/settings).

## PR comments for Test Optimization{% #pr-comments-for-test-optimization %}

PR comments are enabled by default when first onboarding to [Test Optimization](https://docs.datadoghq.com/tests.md) if a [source code management integration](https://docs.datadoghq.com/source_code/source-code-management.md) is installed correctly. Datadog posts a comment summarizing the failed and flaky tests detected in your pull request.

{% image
   source="https://docs.dd-static.net/images/source_code_integration/test-optimization-pr-comment.79a2a5468e84372066a838a7bc0d519e.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/source_code_integration/test-optimization-pr-comment.79a2a5468e84372066a838a7bc0d519e.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="PR Comment summarizing failed and flaky tests detected by Test Optimization" /%}

To disable PR comments for Test Optimization, go to the [Test Optimization Advanced Features Settings](https://app.datadoghq.com/ci/settings/test-optimization/advanced-features).

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Learn about source code management provider integrations](https://docs.datadoghq.com/source_code/source-code-management.md)
- [Learn about PR Gates](https://docs.datadoghq.com/pr_gates.md)
