Skip to content

PR Gates - new product flow [DOCS-10684] #30713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: joepeeples/10684-pr-gates
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
93df0d4
Redo table
joepeeples Jul 25, 2025
9c97c89
Update images, image file names; assorted edits
joepeeples Jul 25, 2025
db637b3
Remove Explorer and subpages
joepeeples Jul 25, 2025
0ddfcf4
Redirect aliases for removed Explorer pages
joepeeples Jul 25, 2025
0ad40d6
Remove "Search and Manage" page
joepeeples Jul 25, 2025
027eb87
Revise Setup page
joepeeples Jul 25, 2025
9f86817
Merge branch 'joepeeples/10684-pr-gates' into joepeeples/10684-pr-gat…
joepeeples Jul 31, 2025
34714db
Delete files for Explorer and Search
joepeeples Jul 31, 2025
fbb2a2d
Remove commented line
joepeeples Jul 31, 2025
6a96ac6
Actually remove it this time
joepeeples Jul 31, 2025
cd96d64
Merge branch 'joepeeples/10684-pr-gates' into joepeeples/10684-pr-gat…
joepeeples Jul 31, 2025
de829d1
Merge branch 'joepeeples/10684-pr-gates' into joepeeples/10684-pr-gat…
joepeeples Aug 1, 2025
c29c911
Merge branch 'joepeeples/10684-pr-gates' into joepeeples/10684-pr-gat…
joepeeples Aug 5, 2025
ebf5462
Remove Audit Trail section
joepeeples Aug 6, 2025
953a92f
Minor cleanup: Integrate in CI/CD section
joepeeples Aug 6, 2025
029a737
Revise status check section
joepeeples Aug 6, 2025
1e069f6
Clean up status checks section
joepeeples Aug 6, 2025
5c493a7
Clean up links
joepeeples Aug 6, 2025
ab8fc3d
Preview banner
joepeeples Aug 6, 2025
da67a78
Site support banner (switch to yaml)
joepeeples Aug 6, 2025
97cc00c
Merge branch 'joepeeples/10684-pr-gates' into joepeeples/10684-pr-gat…
joepeeples Aug 8, 2025
910e725
Update inaccuracies outside of the diff of the PR
markazerdd Aug 15, 2025
f35219d
Apply suggestions from Mark's review
joepeeples Aug 18, 2025
b48dd3f
Apply suggestion from DeForest's review
joepeeples Aug 18, 2025
4b615a6
Apply suggestions from code review
joepeeples Aug 18, 2025
3ac6ae3
Merge branch 'joepeeples/10684-pr-gates' into joepeeples/10684-pr-gat…
joepeeples Aug 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions config/_default/menus/main.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5150,36 +5150,11 @@ menu:
parent: pr_gates
identifier: pr_gates_setup
weight: 1
- name: Search and Manage
url: pr_gates/search
parent: pr_gates
identifier: pr_gates_search
weight: 2
- name: Explorer
url: pr_gates/explorer
parent: pr_gates
identifier: pr_gates_explorer
weight: 3
- name: Search Syntax
url: pr_gates/explorer/search_syntax
parent: pr_gates_explorer
identifier: pr_gates_explorer_search_syntax
weight: 301
- name: Facets
url: pr_gates/explorer/facets
parent: pr_gates_explorer
identifier: pr_gates_explorer_facets
weight: 302
- name: Saved Views
url: pr_gates/explorer/saved_views
parent: pr_gates_explorer
identifier: pr_gates_explorer_saved_views
weight: 303
- name: Guides
url: pr_gates/guide
parent: pr_gates
identifier: pr_gates_guide
weight: 4
weight: 2
- name: DORA Metrics
url: dora_metrics/
pre: ci
Expand Down
2 changes: 1 addition & 1 deletion config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ unsupported_sites:
on-call: [gov]
otlp_agentless: [gov,ap1,ap2]
overview_pages: [gov]
quality_gates: [gov]
pr_gates: [gov]
remote_config: [gov]
remote_configuration: [gov]
resource_catalog: [gov]
Expand Down
109 changes: 39 additions & 70 deletions content/en/pr_gates/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ description: Learn how to use PR Gates to enable your team to control what code
is_beta: false
aliases:
- /quality_gates/
- /quality_gates/explorer/
- /quality_gates/explorer/search_syntax/
- /quality_gates/explorer/facets/
- /quality_gates/explorer/saved_views/
- /quality_gates/search/
further_reading:
- link: "https://app.datadoghq.com/release-notes?category=Software%20Delivery"
tag: "Release Notes"
Expand All @@ -14,12 +19,6 @@ further_reading:
- link: "https://www.datadoghq.com/blog/datadog-github-deployment-protection-rules/"
tag: "Blog"
text: "Use Datadog monitors as quality gates for GitHub Actions deployments"
- link: "/pr_gates/explorer"
tag: "Documentation"
text: "Learn about the PR Gates Explorer"
- link: "/account_management/audit_trail/"
tag: "Documentation"
text: "Learn about Audit Trail"
- link: "https://www.datadoghq.com/blog/datadog-flaky-tests/"
tag: "Blog"
text: "Flaky tests: their hidden costs and how to address flaky behavior"
Expand All @@ -29,108 +28,78 @@ further_reading:
---

{{< callout url="#" btn_hidden="true" header="Join the Preview!" >}}
PR Gates is in Preview.
PR Gates are in Preview.
{{< /callout >}}

{{< site-region region="gov" >}}
<div class="alert alert-warning">PR Gates is not available in the selected site ({{< region-param key="dd_site_name" >}}) at this time.</div>
{{< /site-region >}}

## Overview

PR Gates allow you to control software quality by configuring rules to block substandard code from deployment. You have control over what is merged into the default branch and deployed to production, and can ensure that the code running in production adheres to high quality standards, reducing incidents and minimizing unwanted behaviors.
PR Gates allow you to control software security and quality by configuring rules to block pull requests with substandard code from being merged. Preventing pull requests with substandard code from being merged can ensure that the code that is eventually deployed to production adheres to high organizational standards, reducing incidents and minimizing unwanted behaviors.

{{< img src="pr_gates/setup/sca_2.png" alt="An SCA rule that triggers a failure if any library vulnerabilities with critical or high severity are detected in the repository." style="width:100%" >}}
{{< img src="pr_gates/setup/sca_3.png" alt="An SCA rule that triggers a failure if any library vulnerabilities with critical or high severity are detected in the repository." style="width:100%" >}}

Use PR Gates to:

* Create rules that block workflows using data in Datadog, ensuring that only code that meets your standards end up in production.
* Give your organization the ability to decide what code makes it to production, enhancing your deployment discipline and mitigating potential issues in live environments.
* Continually improve code quality and system performance with precise enforcement and customizable rules.
* Create rules that block pull requests using data in Datadog, ensuring that only code that meets your standards end up being merged.
* Give your organization the ability to prevent substandard code changes from ever reaching production.
* Continually improve code security and quality with precise enforcement and customizable rules.

You can configure PR Gates rules for the following categories:

[Test Optimization][9]

: <br> - New flaky tests <br> - Code coverage

[Static Analysis][11]

: <br> - Code vulnerability violations <br> - Code quality violations

[Software Composition Analysis][12]
| Source type | Condition types |
| --- | ----------- |
| [**Static Code Analysis**][11] | <li> Code vulnerabilities <li> Code quality violations |
| [**Software Composition Analysis**][12] | <li> Library vulnerabilities <li> Library license violations |
| [**Code Coverage**][15] | <li> Total code coverage <li> Patch code coverage |
| [**Infrastructure as Code Scanning**][16] | <li> IaC vulnerabilities |

: <br> - Vulnerabilities <br> - Detected licenses
After creating PR Gates rules, Datadog will automatically create checks on your pull requests using the [GitHub integration][13] or [Azure DevOps integration][14]. Set those checks as required in GitHub or Azure DevOps when you are ready to enforce them.

By integrating PR Gates [into your CI/CD pipelines][7] or allowing the [Datadog GitHub integration][13] to create status checks on your Pull Requests automatically (currently available for SCA rules only), you can create a robust framework for maintaining and improving software quality that aligns with your organization's operational goals and business objectives.

## Setup
## Rule types

PR Gates offers the following rule types:

{{< tabs >}}
{{% tab "Tests" %}}

You can create rules to block code from being merged that introduces new [flaky tests][101] or that decreases [code coverage][102].
{{% tab "Static Code Analysis (SAST)" %}}

{{< img src="pr_gates/setup/flaky_test_2.png" alt="A PR Gate rule that blocks when one or more flaky tests occur" style="width:80%" >}}
You can create rules to block code from being merged when a pull request introduces at least one code vulnerability or code quality violation of a certain severity.

[101]: /tests/flaky_test_management/
[102]: /tests/code_coverage/
{{< img src="pr_gates/setup/static_analysis_3.png" alt="A PR Gate rule that fails when one or more new code quality violations of error-level severity are contained in the repository" style="width:80%" >}}

{{% /tab %}}
{{% tab "Static Analysis" %}}
{{% tab "Software Composition Analysis (SCA)" %}}

You can create rules to block code from being merged when your repository has a certain number of code quality or code vulnerability violations.
You can create rules to block code from being merged when a pull request introduces at least one library vulnerability of a certain severity or at least one library with a forbidden license.

{{< img src="pr_gates/setup/static_analysis_2.png" alt="A PR Gate rule that fails when one or more new code quality violations of error-level severity are contained in the repository" style="width:80%" >}}
{{< img src="pr_gates/setup/sca_3.png" alt="A PR Gate rule that fails when one or more critical or high severity library vulnerabilities are contained in the repository" style="width:80%" >}}

{{% /tab %}}
{{% tab "Software Composition Analysis" %}}
{{% tab "Code Coverage" %}}
You can create rules to block code from being merged when a pull request causes the repository's overall code coverage to fall below a certain percentage or if the patch coverage is below a certain threshold.

You can create rules to block code from being merged when your repository has a certain number of library vulnerabilities or forbidden licenses.
{{< img src="pr_gates/setup/code_coverage.png" alt="A PR Gate rule that fails when one or more critical or high severity library vulnerabilities are contained in the repository" style="width:80%" >}}

{{< img src="pr_gates/setup/sca_2.png" alt="A PR Gate rule that fails when one or more critical or high severity library vulnerabilities are contained in the repository" style="width:80%" >}}

{{% /tab %}}
{{< /tabs >}}

To create a PR Gate rule, see the [Setup documentation][2].

## Search rules
{{% tab "Infrastructure as Code Scanning" %}}
You can create rules to block code from being merged when a pull request introduces at least one infrastructure as code (IaC) vulnerability of a certain severity.

You can evaluate and update quality control processes by accessing PR Gates rules on the [**PR Gates Rules** page][6]. Improve your deployment practices based on your project requirements and desired performance outcomes.

{{< img src="pr_gates/rules_list_2.png" alt="List of PR Gate rules in Datadog" style="width:100%" >}}
{{< img src="pr_gates/setup/iac.png" alt="A PR Gate rule that fails when one or more critical or high severity library vulnerabilities are contained in the repository" style="width:80%" >}}

To search for PR Gate rules, see the [Search and Manage documentation][5].

## Analyze executions in the PR Gates Explorer

You can search and filter for PR Gates or rule executions, create visualizations, and export saved views of your search query on the [**PR Gates Executions** page][14].

{{< tabs >}}
{{% tab "Gates" %}}

{{< img src="pr_gates/explorer/gates_3.png" alt="PR Gate results in the PR Gates Explorer" style="width:100%" >}}

{{% /tab %}}
{{% tab "Rule Executions" %}}

{{< img src="pr_gates/explorer/executions_1.png" alt="PR Gate rule execution results in the PR Gates Explorer" style="width:100%" >}}

{{% /tab %}}
{{< /tabs >}}

For more information, see the [PR Gates Explorer documentation][8].
To create a PR Gate rule, see the [Setup documentation][2].

## Track changes in rules
## Manage rules

You can view information about who created, modified, and deleted PR Gates rules in [Audit Trail][3].
You can manage and update PR Gates rules on the [**PR Gates Rules**][6] page. Improve your security and quality practices based on your project requirements and risk tolerances.

{{< img src="pr_gates/audit_event.png" alt="A PR Gates event in Datadog Audit Trail" style="width:100%" >}}
You can see all of the rules defined by the organization.

For more information, see the [Audit Trail documentation][4].
{{< img src="pr_gates/rules_list_3.png" alt="List of PR Gate rules in Datadog" style="width:100%" >}}

## Further Reading

Expand All @@ -140,13 +109,13 @@ For more information, see the [Audit Trail documentation][4].
[2]: /pr_gates/setup/
[3]: /account_management/audit_trail/
[4]: /account_management/audit_trail/events/#ci-visibility-events
[5]: /pr_gates/search/
[6]: https://app.datadoghq.com/ci/pr-gates
[7]: https://github.com/DataDog/datadog-ci
[8]: /pr_gates/explorer/
[9]: /tests/
[10]: /continuous_integration/
[11]: /security/code_security/static_analysis
[12]: /security/code_security/software_composition_analysis
[13]: /integrations/github/
[14]: https://app.datadoghq.com/ci/pr-gates/
[14]: /integrations/azure_devops_source_code/
[15]: https://www.datadoghq.com/product-preview/code-coverage
[16]: /security/code_security/iac_security/
113 changes: 0 additions & 113 deletions content/en/pr_gates/explorer/_index.md

This file was deleted.

Loading
Loading