From 9265136a64a727fefad2af5352755f6bfd50f445 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Tue, 14 Nov 2023 17:50:23 +0000 Subject: [PATCH] [ci]Fix precheck getting commit id in the fallback (#29849) --- .pipelines/ci/templates/build-powertoys-precheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/ci/templates/build-powertoys-precheck.yml b/.pipelines/ci/templates/build-powertoys-precheck.yml index f68d2dbe16..14f1b01b3b 100644 --- a/.pipelines/ci/templates/build-powertoys-precheck.yml +++ b/.pipelines/ci/templates/build-powertoys-precheck.yml @@ -27,7 +27,7 @@ jobs: } catch { # Fall back to the latest commit otherwise. - $commit = "$(system.pullRequest.sourceCommitId)"; + $commit = "$(build.sourceVersion)"; $gitHubCommit = Invoke-RestMethod -Method Get "https://api.github.com/repos/microsoft/PowerToys/commits/$commit" if(([array]($githubCommit.files.filename) -notmatch ".md|.txt").Length -eq 0) { Write-Host '##vso[task.setvariable variable=skipBuild;isOutput=true]Yes'