mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[ci]Fix precheck getting commit id in the fallback (#29849)
This commit is contained in:
@@ -27,7 +27,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
# Fall back to the latest commit otherwise.
|
# 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"
|
$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) {
|
if(([array]($githubCommit.files.filename) -notmatch ".md|.txt").Length -eq 0) {
|
||||||
Write-Host '##vso[task.setvariable variable=skipBuild;isOutput=true]Yes'
|
Write-Host '##vso[task.setvariable variable=skipBuild;isOutput=true]Yes'
|
||||||
|
|||||||
Reference in New Issue
Block a user