From d693836a8d508d6d0a5c3735e4ef4ee2bec31def Mon Sep 17 00:00:00 2001 From: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Date: Thu, 2 Mar 2023 16:13:01 +0800 Subject: [PATCH] Fix the issue for daily build (#21104) --- build.proj | 3 ++- tools/ExecuteCIStep.ps1 | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.proj b/build.proj index 0f4a332f4767..b10989351ada 100644 --- a/build.proj +++ b/build.proj @@ -198,7 +198,8 @@ publish - + + diff --git a/tools/ExecuteCIStep.ps1 b/tools/ExecuteCIStep.ps1 index de009dea2056..467f26a2a079 100644 --- a/tools/ExecuteCIStep.ps1 +++ b/tools/ExecuteCIStep.ps1 @@ -261,7 +261,9 @@ If ($Build) } $Template.$DependencyStep.Details += $Detail } - $Template | Add-Member -NotePropertyName pull_request_number -NotePropertyValue $PullRequestNumber + If ($PSBoundParameters.ContainsKey("PullRequestNumber")) { + $Template | Add-Member -NotePropertyName pull_request_number -NotePropertyValue $PullRequestNumber + } ConvertTo-Json -Depth 10 -InputObject $Template | Out-File -FilePath "$RepoArtifacts/PipelineResult/PipelineResult.json" #EndRegion