Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tools/devops/automation/scripts/GitHub.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,12 @@ function Get-GitHubPRsForHash {

Write-Host "Getting related PR ids for commit $Hash"

$prs = [System.Collections.ArrayList]@()
if ($Env:IS_PR -eq "false") {
Write-Host "This isn't a PR, IS_PR=false"
return $prs
}

if ($Org -and $Repo) {
$url = "https://api.github.com/repos/$($Org)/$($Repo)/commits/$Hash/pulls"
} else {
Expand All @@ -902,7 +908,6 @@ function Get-GitHubPRsForHash {
Write-Host "Request result: $request"

# loop over the result and remove all the extra noise we are not interested in
$prs = [System.Collections.ArrayList]@()
foreach ($prInfo in $request) {
$state = $prInfo.state
if ($state -ne "open") {
Expand Down
1 change: 1 addition & 0 deletions tools/devops/automation/templates/tests/publish-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ steps:
TESTS_JOBSTATUS: $(TESTS_JOBSTATUS) # set by the runTests step
TESTS_SUMMARY: $(TEST_SUMMARY_PATH)
ACCESSTOKEN: $(System.AccessToken)
IS_PR: ${{ parameters.isPR }}
${{ if eq(parameters.repositoryAlias, 'self') }}:
COMMENT_HASH: $(fix_commit.GIT_HASH)
${{ else }}:
Expand Down