pull request トリガーは、プル要求ビルドを実行する分岐を指定します。
実装
| 実装 | 説明 |
|---|---|
| pr: なし | pull request トリガーを無効にします。 |
| pr: 文字列リストの | 実行をトリガーするブランチの一覧。 |
| pr: autoCancel、branchs、paths、drafts | 完全な制御のための完全な構文。 |
| 実装 | 説明 |
|---|---|
| pr: なし | pull request トリガーを無効にします。 |
| pr: 文字列リストの | 実行をトリガーするブランチの一覧。 |
| pr: autoCancel、branch、paths | 完全な制御のための完全な構文。 |
注釈
pull request トリガーを指定しない場合は、任意のブランチへのプル要求によってビルドがトリガーされます。
pr キーワードには、含める分岐の一覧、PR トリガーを無効にする方法、完全な制御のための完全な構文の 3 つの構文オプションがあります。
重要
YAML PR トリガーは、GitHub と Bitbucket Cloud でのみサポートされます。 Azure Repos Git を使用する場合は、ビルド検証 の ブランチ ポリシーを構成して、検証のためにビルド パイプラインをトリガーできます。
exclude または includeに branches 句を指定せずに paths 句を指定する場合、* 句で include を指定することと同じです。
pr: none
pull request トリガーを無効にします。
pr: none # Disable pull request triggers.
pr 文字列。 使用できる値: なし。
pull request トリガーを無効にします。
例示
無効化構文:
pr: none # will disable PR builds (but not CI builds)
pr: 文字列リスト
実行をトリガーするブランチの一覧。
pr: [ string ] # List of branches that trigger a run.
リストの種類
| タイプ | 説明 |
|---|---|
| 糸 | 実行をトリガーするブランチの一覧。 |
注釈
list 構文は、プル要求が発生したとき、またはプル要求が発生したプル要求のソース ブランチにプッシュされたときに実行をトリガーするブランチのリストを指定します。
例示
リスト構文:
pr:
- main
- develop
pr: autoCancel,branchs, paths, drafts
pull request トリガーを完全に制御する必要がある場合は、完全な構文を使用します。
pr:
autoCancel: boolean # Whether to cancel running PR builds when a new commit lands in the branch. Default: true.
branches: # Branch names to include or exclude for triggering a run.
include: [ string ] # List of items to include.
exclude: [ string ] # List of items to exclude.
paths: # File paths to include or exclude for triggering a run.
include: [ string ] # List of items to include.
exclude: [ string ] # List of items to exclude.
drafts: boolean # Whether to start a run when a draft PR is created. Default: true.
特性
ブールを autoCancelします。
新しいコミットがブランチに着いたときに、実行中の PR ビルドを取り消すかどうかを示します。 既定値: true。
includeExcludeFiltersを branchesします。
実行をトリガーするために含めるか除外するブランチ名。
includeExcludeFiltersを pathsします。
実行をトリガーするために含めるか除外するファイル パスです。
ブールを draftsします。
下書き PR の作成時に実行を開始するかどうかを示します。 既定値: true。
pr: autoCancel,branchs, paths
完全な制御のための完全な構文。
pr:
autoCancel: boolean # Whether to cancel running PR builds when a new commit lands in the branch. Default: true.
branches: # Branch names to include or exclude for triggering a run.
include: [ string ] # List of items to include.
exclude: [ string ] # List of items to exclude.
paths: # File paths to include or exclude for triggering a run.
include: [ string ] # List of items to include.
exclude: [ string ] # List of items to exclude.
特性
ブールを autoCancelします。
新しいコミットがブランチに着いたときに、実行中の PR ビルドを取り消すかどうかを示します。 既定値: true。
includeExcludeFiltersを branchesします。
実行をトリガーするために含めるか除外するブランチ名。
includeExcludeFiltersを pathsします。
実行をトリガーするために含めるか除外するファイル パスです。
例示
完全な構文:
pr:
branches:
include:
- features/*
exclude:
- features/experimental/*
paths:
exclude:
- README.md