Skip to content

docs: update Azure DevOps pipeline instructions for PR-Agent#2017

Merged
mrT23 merged 2 commits into
The-PR-Agent:mainfrom
abhinav-1305:update-docs-azure
Sep 5, 2025
Merged

docs: update Azure DevOps pipeline instructions for PR-Agent#2017
mrT23 merged 2 commits into
The-PR-Agent:mainfrom
abhinav-1305:update-docs-azure

Conversation

@abhinav-1305
Copy link
Copy Markdown
Contributor

@abhinav-1305 abhinav-1305 commented Aug 29, 2025

User description

fixes: #2015


PR Type

Documentation


Description

  • Update Azure DevOps pipeline configuration instructions

  • Add Build Validation setup guide for Azure Repos Git

  • Remove YAML pr: triggers for Azure Repos compatibility

  • Clarify differences between Azure Repos and other providers


Diagram Walkthrough

flowchart LR
  A["YAML pr: triggers"] -- "removed for" --> B["Azure Repos Git"]
  B -- "replaced with" --> C["Build Validation"]
  C -- "configured via" --> D["Branch Policies"]
Loading

File Walkthrough

Relevant files
Documentation
azure.md
Update Azure DevOps pipeline setup instructions                   

docs/docs/installation/azure.md

  • Remove YAML pr: trigger configuration section
  • Add detailed Build Validation setup instructions
  • Clarify Azure Repos Git vs other providers differences
  • Fix capitalization of "Azure DevOps"
+17/-8   

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

2015 - PR Code Verified

Compliant requirements:

  • Clarify that YAML pr: triggers do not work for Azure Repos Git.
  • Instruct users to configure Build Validation via Branch Policies for PR validation.
  • Remove/avoid YAML pr: section in Azure Repos instructions.
  • Update Azure DevOps documentation to reflect distinction from GitHub/Bitbucket Cloud.
  • Provide clear, step-by-step guidance for setting up Build Validation.

Requires further human verification:

  • Validate that the updated steps match current Azure DevOps UI labels/paths.
  • Confirm the PR Agent pipeline runs successfully under Branch Policies in a real Azure Repos project.
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
✅ No TODO sections
🔒 No security concerns identified
⚡ Recommended focus areas for review

Clarity

The note states Azure Repos Git doesn't use YAML pr: triggers; ensure this is clearly scoped so users on GitHub/Bitbucket Cloud don't remove their pr: blocks by mistake. Consider an explicit warning callout.

# NOTE for Azure Repos Git:
# Azure Repos does not honor YAML pr: triggers. Configure Build Validation
# via Branch Policies instead (see note below). You can safely omit pr:.
Accuracy

Verify the exact Azure DevOps navigation terms (Project Settings → Repositories → Branches → Branch Policies) and that "Build Validation" and "Required" naming matches current UI.

1. Go to Project Settings → Repositories → Branches.
2. Select the target branch and open Branch Policies.
3. Under Build Validation, add a policy:
   - Select the PR Agent pipeline (the `azure-pipelines.yml` above).
   - Set it as Required.
4. Remove the `pr:` section from your YAML (not needed for Azure Repos Git).

This distinction applies specifically to Azure Repos Git. Other providers like GitHub and Bitbucket Cloud can use YAML-based PR triggers.

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects Bot commented Aug 29, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Separate provider-specific examples

Removing the YAML pr: section in the main sample makes it Azure Repos–specific
and will disable PR runs for GitHub/Bitbucket users who copy it verbatim.
Present two clearly separated configurations: one for Azure Repos (Build
Validation, no pr:) and another for GitHub/Bitbucket Cloud (retain YAML pr:
triggers), with an upfront callout to prevent misconfiguration.

Examples:

docs/docs/installation/azure.md [6-71]
```yaml
# Opt out of CI triggers
trigger: none

# NOTE for Azure Repos Git:
# Azure Repos does not honor YAML pr: triggers. Configure Build Validation
# via Branch Policies instead (see note below). You can safely omit pr:.

stages:
- stage: pr_agent

 ... (clipped 56 lines)

Solution Walkthrough:

Before:

```markdown
## Azure DevOps Pipeline
Add the following file to your repository:
```yaml
trigger: none

# NOTE for Azure Repos Git:
# Azure Repos does not honor YAML pr: triggers.
# Configure Build Validation instead...

stages:
  ...

Azure Repos Git PR triggers and Build Validation

Azure Repos Git does not use YAML pr: triggers...
...
This distinction applies specifically to Azure Repos Git. Other providers like GitHub and Bitbucket Cloud can use YAML-based PR triggers.


After:

```markdown
## Azure DevOps Pipeline
Configuration depends on your Git provider.

### For GitHub / Bitbucket Cloud
Use the following configuration with a `pr` trigger:
```yaml
trigger: none
pr:
  branches:
    include: ['*']
stages:
  ...

For Azure Repos Git

Use Build Validation and the following YAML (without a pr trigger):

trigger: none
stages:
  ...

Instructions for setting up Build Validation...


Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a major flaw where the main example only works for Azure Repos, potentially breaking the setup for GitHub/Bitbucket users. Providing separate, complete examples significantly improves documentation clarity and prevents user error.

High
Possible issue
Fix inaccurate PR trigger guidance

Revise to state that Azure Repos Git supports YAML pr: triggers and present
Build Validation as an alternative. Also correct the provider note: pr: triggers
are supported for Azure Repos Git and GitHub, while Bitbucket Cloud PR triggers
are not supported in Azure Pipelines.

docs/docs/installation/azure.md [60-71]

 ### Azure Repos Git PR triggers and Build Validation
 
-Azure Repos Git does not use YAML `pr:` triggers for pipelines. Instead, configure Build Validation on the target branch to run the PR Agent pipeline for pull requests:
+Azure Repos Git supports YAML `pr:` triggers. You can either:
+- Define `pr:` in your `azure-pipelines.yml` to run on pull requests, or
+- Configure Branch Policies (Build Validation) on the target branch to run the pipeline for PRs.
 
+To set up Build Validation:
 1. Go to Project Settings → Repositories → Branches.
 2. Select the target branch and open Branch Policies.
 3. Under Build Validation, add a policy:
    - Select the PR Agent pipeline (the `azure-pipelines.yml` above).
    - Set it as Required.
-4. Remove the `pr:` section from your YAML (not needed for Azure Repos Git).
+4. If you use Build Validation, remove the YAML `pr:` section (or disable it) to avoid duplicate runs.
 
-This distinction applies specifically to Azure Repos Git. Other providers like GitHub and Bitbucket Cloud can use YAML-based PR triggers.
+Provider notes:
+- YAML `pr:` triggers are supported for Azure Repos Git and GitHub.
+- Bitbucket Cloud PR triggers are not supported by Azure Pipelines; use CI triggers on push instead.
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion corrects a significant factual error in the documentation regarding Azure Repos Git's support for YAML pr: triggers, and also clarifies an inaccuracy about Bitbucket Cloud support, preventing user confusion and misconfiguration.

High
  • Update
  • Author self-review: I have reviewed the PR code suggestions, and addressed the relevant ones.

Comment thread docs/docs/installation/azure.md
@mrT23 mrT23 merged commit 9ad8e92 into The-PR-Agent:main Sep 5, 2025
2 checks passed
@abhinav-1305 abhinav-1305 deleted the update-docs-azure branch September 5, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The YAML pr: triggers don't work with Azure Repos Git

2 participants