AzureDevOps project low builtIn

Description

Retention policy - Days to keep pull request runs (>= 10). Runs represent one execution of a pipeline. During a run, the pipeline is processed, and agents process one or more jobs. A pipeline run includes jobs, steps, and tasks. Runs power both continuous integration (CI) and continuous delivery (CD) pipelines. Learn more: https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention

Recommendation

1. Navigate to Project Settings. 
2. Open the Settings link under Pipelines. 
3. Set the number of days to keep pull request runs.

Policy Rule

{
  "target": "ADOProjectPipelineRetentionSettings",
  "if": {
    "allOf": [
      {
        "resource": "ADOProjectPipelineRetentionSettings",
        "property": "PurgePullRequestRuns.Value",
        "operator": "greaterThan",
        "value": 9
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}