From 0ee9b8f9c39f50cbc7c44986188641560bb481a4 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Mon, 30 Sep 2019 13:39:06 -0700 Subject: [PATCH] (GH-259) Actually fix todo comments --- Cake.Recipe/Content/azurepipelines.cake | 6 +----- Cake.Recipe/Content/buildProvider.cake | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Cake.Recipe/Content/azurepipelines.cake b/Cake.Recipe/Content/azurepipelines.cake index 4eea1221..dc99af64 100644 --- a/Cake.Recipe/Content/azurepipelines.cake +++ b/Cake.Recipe/Content/azurepipelines.cake @@ -39,11 +39,7 @@ public class AzurePipelinesPullRequestInfo : IPullRequestInfo { public AzurePipelinesPullRequestInfo(ITFBuildProvider tfBuild, ICakeEnvironment environment) { - var value = tfBuild.Environment.PullRequest.IsPullRequest; - - IsPullRequest = !string.IsNullOrWhiteSpace(value) && int.TryParse(value, out var id) - ? id > 0 - : false; + IsPullRequest = tfBuild.Environment.PullRequest.IsPullRequest; } public bool IsPullRequest { get; } diff --git a/Cake.Recipe/Content/buildProvider.cake b/Cake.Recipe/Content/buildProvider.cake index 1e682ea9..24bf93fb 100644 --- a/Cake.Recipe/Content/buildProvider.cake +++ b/Cake.Recipe/Content/buildProvider.cake @@ -37,7 +37,7 @@ public interface IBuildProvider public static IBuildProvider GetBuildProvider(ICakeContext context, BuildSystem buildSystem) { - if (IsRunningOnAzurePipelines || IsRunningOnAzurePipelinesHosted) + if (buildSystem.IsRunningOnAzurePipelines || buildSystem.IsRunningOnAzurePipelinesHosted) { return new AzurePipelinesBuildProvider(buildSystem.TFBuild, context.Environment); }