diff --git a/avm/utilities/pipelines/platform/Set-AvmGitHubPrLabels.ps1 b/avm/utilities/pipelines/platform/Set-AvmGitHubPrLabels.ps1 index 06c5f87814..c0ed737877 100644 --- a/avm/utilities/pipelines/platform/Set-AvmGitHubPrLabels.ps1 +++ b/avm/utilities/pipelines/platform/Set-AvmGitHubPrLabels.ps1 @@ -37,8 +37,9 @@ function Set-AvmGitHubPrLabels { . (Join-Path $RepoRoot 'avm' 'utilities' 'pipelines' 'platform' 'helper' 'Get-GithubTeamMembersLogin.ps1') . (Join-Path $RepoRoot 'avm' 'utilities' 'pipelines' 'platform' 'helper' 'Get-AvmCsvData.ps1') - $pr = gh pr view $PrUrl.Replace('api.', '').Replace('repos/', '') --json 'author,title,url,body,comments' --repo $Repo | ConvertFrom-Json -Depth 100 - $allTeamNames = [array](Get-GithubPrRequestedReviewerTeamNames -PrUrl $PrUrl.Replace('api.', '').Replace('repos/', '')) + $sanitizedPrUrl = $PrUrl.Replace('api.', '').Replace('repos/', '').Replace('pulls/', 'pull/') + $pr = gh pr view $sanitizedPrUrl --json 'author,title,url,body,comments' --repo $Repo | ConvertFrom-Json -Depth 100 + $allTeamNames = [array](Get-GithubPrRequestedReviewerTeamNames -PrUrl $sanitizedPrUrl) $teamNames = [array]($allTeamNames | Where-Object { $_ -ne 'bicep-admins' -and $_ -ne 'avm-core-team-technical-bicep' -and $_ -ne 'avm-module-reviewers-bicep' }) # core team is already assigned, no or more than one module reviewer team is assigned