GitHub 拉取请求触发 Azure DevOps 中的所有管道

Eva*_*tti 4 git github azure-devops azure-pipelines

我在 Azure DevOps 中有 3 个管道,每个分支都有,代码位于 GitHub 上。

每当我执行任何拉取请求时,我的 3 个管道都会被触发。我怎样才能避免这种情况?

该消息显示“公关自动化”

在此输入图像描述

我的 3 个管道使用独立的分支:

开发管道

trigger:
  branches:
    include: [develop]
  paths:
    include:
      - backend/*
Run Code Online (Sandbox Code Playgroud)

暂存管道

trigger:
  branches:
    include: [staging]
  paths:
    include:
      - backend/*
Run Code Online (Sandbox Code Playgroud)

生产流水线

trigger:
  branches:
    include: [master]
  paths:
    include:
      - backend/*
Run Code Online (Sandbox Code Playgroud)

Eva*_*tti 8

我在文档PR 触发器中找到了如何禁用所有 PR 的运行,添加了:

pr: none
Run Code Online (Sandbox Code Playgroud)

它在根中是这样的:

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

pr: none
Run Code Online (Sandbox Code Playgroud)

还:

重要的

YAML PR 触发器仅在 GitHub 和 Bitbucket Cloud 中受支持。如果使用 Azure Repos Git,则可以配置用于构建验证的分支策略,以触发构建管道进行验证。