Skip to content

Commit

Permalink
(GH-259) Actually fix todo comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Sep 30, 2019
1 parent fd64332 commit 0ee9b8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions Cake.Recipe/Content/azurepipelines.cake
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Cake.Recipe/Content/buildProvider.cake
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0ee9b8f

Please sign in to comment.