pr definition
A pull request trigger specifies which branches cause a pull request build to run.
Properties that use this definition: pipeline.pr
Properties that use this definition: pipeline.pr
Properties that use this definition: pipeline.pr
Properties that use this definition: pipeline.pr
Properties that use this definition: pipeline.pr
Overloads
Overload | Description |
---|---|
pr: none | Disable pull request triggers. |
pr: branchFilter list | List of branches that trigger a run. |
pr: branches, paths | Full syntax for complete control. |
Overload | Description |
---|---|
pr: none | Disable pull request triggers. |
pr: branchFilter list | List of branches that trigger a run. |
pr: autoCancel, branches, paths | Full syntax for complete control. |
Overload | Description |
---|---|
pr: none | Disable pull request triggers. |
pr: branchFilter list | List of branches that trigger a run. |
pr: autoCancel, branches, paths | Full syntax for complete control. |
Overload | Description |
---|---|
pr: none | Disable pull request triggers. |
pr: branchFilter list | List of branches that trigger a run. |
pr: autoCancel, branches, paths | Full syntax for complete control. |
Overload | Description |
---|---|
pr: none | Disable pull request triggers. |
pr: branchFilter list | List of branches that trigger a run. |
pr: autoCancel, branches, paths, drafts | Full syntax for complete control. |
Remarks
If you specify no pull request trigger, pull requests to any branch trigger a build.
There are three distinct syntax options for the pr
keyword: a list of branches to include, a way to disable PR triggers, and the full syntax for complete control.
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.
Important
YAML PR triggers are supported only in GitHub. If you use Azure Repos Git, you can configure a branch policy for build validation to trigger your build pipeline for validation.
If you specify an exclude
clause without an include
clause for branches
or paths
, it is equivalent to specifying *
in the include
clause.
Important
When you specify a pull request trigger, only branches that you explicitly configure for inclusion trigger a pipeline. Inclusions are processed first, and then exclusions are removed from that list. If you specify an exclusion but no inclusions, nothing triggers.
pr: none
Disable pull request triggers.
pr: none # Disable pull request triggers.
Properties
pr
string
Disable pull request triggers. Acceptable values: nonepr: none # Disable pull request triggers.
Properties
pr
string
Disable pull request triggers. Acceptable values: nonepr: none # Disable pull request triggers.
Properties
pr
string
Disable pull request triggers. Acceptable values: nonepr: none # Disable pull request triggers.
Properties
pr
string
Disable pull request triggers. Acceptable values: nonepr: none # Disable pull request triggers.
Properties
pr
string
Disable pull request triggers. Acceptable values: noneExamples
Disablement syntax:
pr: none # will disable PR builds (but not CI builds)
pr: branchFilter list
The list syntax specifies a list of branches which trigger a run when a pull request is raised or a push is made to the source branch of a raised pull request.
pr: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*
Properties
pr
string
Disable pull request triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*pr: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*
Properties
pr
string
Disable pull request triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*pr: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*
Properties
pr
string
Disable pull request triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*pr: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*
Properties
pr
string
Disable pull request triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*pr: [ branchFilter ] # List of branches that trigger a run. [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*
Properties
pr
string
Disable pull request triggers. Acceptable values: [^\/~\^\: \[\]\\]+(\/[^\/~\^\: \[\]\\]+)*Examples
List syntax:
pr:
- main
- develop
pr: branches, paths
Full syntax for complete control.
pr:
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
paths: # File paths to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
Properties
branches
include/exclude string list
Branch names to include or exclude for triggering a run.paths
include/exclude string list
File paths to include or exclude for triggering a run.pr: autoCancel, branches, paths
Full syntax for complete control.
pr:
autoCancel: boolean # Whether to cancel running PR builds when a new commit lands in the branch. (false,n,no,off,on,true,y,yes)
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
paths: # File paths to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
Properties
autoCancel
boolean
Whether to cancel running PR builds when a new commit lands in the branch.branches
include/exclude string list
Branch names to include or exclude for triggering a run.paths
include/exclude string list
File paths to include or exclude for triggering a run.pr:
autoCancel: boolean # Whether to cancel running PR builds when a new commit lands in the branch. (false,n,no,off,on,true,y,yes)
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
paths: # File paths to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
Properties
autoCancel
boolean
Whether to cancel running PR builds when a new commit lands in the branch.branches
include/exclude string list
Branch names to include or exclude for triggering a run.paths
include/exclude string list
File paths to include or exclude for triggering a run.pr:
autoCancel: boolean # Whether to cancel running PR builds when a new commit lands in the branch. (false,n,no,off,on,true,y,yes)
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
paths: # File paths to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
Properties
autoCancel
boolean
Whether to cancel running PR builds when a new commit lands in the branch.branches
include/exclude string list
Branch names to include or exclude for triggering a run.paths
include/exclude string list
File paths to include or exclude for triggering a run.pr: autoCancel, branches, paths, drafts
Use the full syntax when you need full control of the pull request trigger.
pr:
autoCancel: boolean # Whether to cancel running PR builds when a new commit lands in the branch. (false,n,no,off,on,true,y,yes)
branches: # Branch names to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
paths: # File paths to include or exclude for triggering a run.
include: [ branchFilter ] # List of items to include.
exclude: [ branchFilter ] # List of items to exclude.
drafts: boolean # Whether to start a run when a draft PR is created. (false,n,no,off,on,true,y,yes)
Properties
autoCancel
boolean
Whether to cancel running PR builds when a new commit lands in the branch.branches
include/exclude string list
Branch names to include or exclude for triggering a run.paths
include/exclude string list
File paths to include or exclude for triggering a run.drafts
boolean
Whether to start a run when a draft PR is created.Examples
Full syntax:
pr:
branches:
include:
- features/*
exclude:
- features/experimental/*
paths:
exclude:
- README.md
See also
Learn more about pull request triggers and how to specify them.
Feedback
Feedback senden und anzeigen für