Skip to main content
MergeGuide integrates with Azure DevOps to evaluate pull requests. When a PR is opened or updated, MergeGuide checks the changes against your policies and reports the result back on the pull request.

How it works

Once connected, MergeGuide receives pull request events from your Azure DevOps project through a service hook. On a relevant event it evaluates the changed code and posts the result to the PR. Blocking findings hold the merge until resolved.

Connect Azure DevOps

1

Add the repository in the dashboard

In portal.mergeguide.ai, open Repositories and connect your Azure DevOps repository.
2

Create a service hook

In your Azure DevOps project settings, add a service hook for pull request events using the URL and shared secret MergeGuide provides. The secret lets MergeGuide verify that requests genuinely come from Azure DevOps.
3

Open a pull request

Open or update a PR. MergeGuide evaluates the change and reports the result on the pull request.

Run in Azure Pipelines

You can also run MergeGuide as a pipeline step. Install the CLI and run a check:
azure-pipelines.yml
trigger: none

pr:
  - main

pool:
  vmImage: ubuntu-latest

steps:
  - task: UsePythonVersion@0
    inputs:
      versionSpec: '3.11'
  - script: |
      pip install mergeguide
      mergeguide check . --fail-on-warning
    displayName: 'MergeGuide policy check'
See CI/CD patterns for the general pipeline recipe.

Block merges on findings

Require the MergeGuide check to pass before completing a PR using branch policies in your Azure DevOps repository settings. See Set up the PR gate.

Next steps

PR gate

Block merges on blocking findings.

CI/CD patterns

Wire MergeGuide into any pipeline.