pr 定義

pull request トリガーは、pull request ビルドを実行するブランチを指定します。

この定義を参照する定義: パイプライン

実装

実装 説明
pr: none pull request トリガーを無効にします。
pr: 文字列リスト 実行をトリガーするブランチの一覧。
pr: autoCancel,branchs, paths, drafts 完全な制御のための完全な構文。
実装 説明
pr: none pull request トリガーを無効にします。
pr: 文字列リスト 実行をトリガーするブランチの一覧。
pr: autoCancel、branchs、paths 完全な制御のための完全な構文。
実装 説明
pr: none pull request トリガーを無効にします。
pr: 文字列リスト 実行をトリガーするブランチの一覧。
pr: ブランチ、パス 完全な制御のための完全な構文。

解説

pull request トリガーを指定しないと、任意のブランチに対する pull request によってビルドがトリガーされます。

pr キーワードには、3 つの異なる構文オプションがあります: 含めるブランチのリスト、PR トリガーを無効にする方法、完全な制御のための完全な構文。

重要

YAML PR トリガーは、GitHub と Bitbucket Cloud でのみサポートされています。 Azure Repos Git を使う場合は、ビルド検証用のブランチ ポリシーを構成して、検証のためにビルド パイプラインをトリガーできます。

重要

YAML PR トリガーは GitHub でのみサポートされています。 Azure Repos Git を使う場合は、ビルド検証用のブランチ ポリシーを構成して、検証のためにビルド パイプラインをトリガーできます。

branches または paths に対して include 句を指定せずに exclude 句を指定することは、include 句で * を指定することと同じです。

重要

pull request トリガーを指定すると、包含するように明示的に構成したブランチのみがパイプラインをトリガーします。 含めるものが最初に処理され、次に除外するものがリストから削除されます。 除外するものだけを指定して、含めるものを指定しないと、何もトリガーしません。

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.

リストの種類

Type 説明
string 実行をトリガーするブランチの一覧。

解説

list 構文では、プル要求が発生したとき、またはプル要求が発生した pull request のソース ブランチにプッシュが行われたときに実行をトリガーするブランチのリストを指定します。

リストの構文:

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.

プロパティ

autoCancelboolean
新しいコミットがブランチに到達したときに、実行中の PR ビルドを取り消すかどうか。 既定値: true。

branchesincludeExcludeFilters
実行をトリガーするために含める、または除外するブランチ名。

pathsincludeExcludeFilters
実行をトリガーするために含めるか除外するファイル パス。

draftsboolean
下書き 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.

プロパティ

autoCancelboolean
新しいコミットがブランチに到達したときに、実行中の PR ビルドを取り消すかどうか。 既定値: true。

branchesincludeExcludeFilters
実行をトリガーするために含める、または除外するブランチ名。

pathsincludeExcludeFilters
実行をトリガーするために含めるか除外するファイル パス。

pr: ブランチ、パス

完全な制御のための完全な構文。

pr:
  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.

プロパティ

branchesincludeExcludeFilters
実行をトリガーするために含める、または除外するブランチ名。

pathsincludeExcludeFilters
実行をトリガーするために含めるか除外するファイル パス。

完全な構文:

pr:
  branches:
    include:
    - features/*
    exclude:
    - features/experimental/*
  paths:
    exclude:
    - README.md

関連項目

pull request トリガーとその指定方法の詳細を理解してください。