Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub pull requests triggering all pipelines in Azure DevOps

I have 3 pipelines in Azure DevOps, on for each branch, and the code is on GitHub.

Whenever I do any Pull Request all my 3 pipelines get triggered. How can I avoid that?

The message says "PR automated for"

enter image description here

My 3 pipelines are using separated branches:

develop pipeline

trigger:
  branches:
    include: [develop]
  paths:
    include:
      - backend/*

staging pipeline

trigger:
  branches:
    include: [staging]
  paths:
    include:
      - backend/*

production pipeline

trigger:
  branches:
    include: [master]
  paths:
    include:
      - backend/*
like image 396
Evandro Pomatti Avatar asked Oct 22 '25 02:10

Evandro Pomatti


1 Answers

I found in the docs PR trigger how to disable the run for all PRs adding:

pr: none

It goes in the root like this:

trigger:
  branches:
    include: [develop]
  paths:
    include:
      - backend/*

pr: none

Also:

Important

YAML PR triggers are supported only in GitHub and Bitbucket Cloud. If you use Azure Repos Git, you can configure a branch policy for build validation to trigger your build pipeline for validation.

like image 171
Evandro Pomatti Avatar answered Oct 24 '25 18:10

Evandro Pomatti