BuildSystem.

IsPullRequest Property

Summary

Gets a value indicating whether the current build was started by a pull request.
Namespace
Cake.Common.Build
Containing Type
BuildSystem

Syntax

public bool IsPullRequest { get; }

Examples

 // Gets a flag telling us if this build was started by a pull request.
 var isPullRequest = BuildSystem.IsPullRequest;

 // Define a task that only runs when not a pull request.
 Task("Publish")
   .WithCriteria(!isPullRequest)
   .Does(() =>
 {
 });

Value

Type Description
bool true if the current build was started by a pull request; otherwise, false.