@@ -50,17 +50,21 @@ jobs:
5050 - ' !sdk/**/recordings/*'
5151 - ' !sdk/**/SessionRecords/*'
5252 - ' !sdk/**/session-records/*'
53+ ${{ if endsWith(parameters.Repository, '-pr') }} :
54+ TokenToUseForAuth : $(azuresdk-github-pat)
55+
5356 - template : /eng/common/pipelines/templates/steps/install-pipeline-generation.yml
5457 - template : /eng/common/pipelines/templates/steps/set-default-branch.yml
5558
5659 - pwsh : |
5760 Write-Host "Setting up pipeline variables"
58- if ("${{ parameters.Repository }}" -match "Azure/azure-sdk-for-(?<prefix>[^-]*)(?<pr>-pr)?") {
59- $prefix = $matches['prefix']
60- $devOpsPath = "\$prefix"
61+ if ("${{ parameters.Repository }}" -match "Azure/azure-sdk-for-(?<lang>[^-]*)(?<pr>-pr)?") {
62+ $lang = $matches['lang']
63+ $devOpsPath = "\$lang"
64+ $prefix = $lang
6165 if ($matches['pr']) {
6266 $devOpsPath = "${devOpsPath}\pr"
63- $prefix = "${prefix} -pr"
67+ $prefix + = "-pr"
6468 Write-Host "##vso[task.setvariable variable=ProjectForPRValidation]internal"
6569 }
6670 Write-Host "Prefix = $prefix"
7983 $testServiceConnections = '"Azure" "azure-sdk-tests" "azure-sdk-tests-preview" "azure-sdk-tests-public" "Azure SDK Test Resources - LiveTestSecrets"'
8084 $internalServiceConnections = '"Azure" "Azure SDK Artifacts" "Azure SDK Engineering System" "opensource-api-connection" "AzureSDKEngKeyVault Secrets"'
8185
82- # Map the language prefix to the appropriate variable groups
83- switch ($prefix )
86+ # Map the language to the appropriate variable groups
87+ switch ($lang )
8488 {
8589 "java" {
8690 $internalVariableGroups = '$(AzureSDK_Maven_Release_Pipeline_Secrets) $(Release_Secrets_for_GitHub) $(APIReview_AutoCreate_Configurations)'
@@ -115,7 +119,7 @@ jobs:
115119 $generateUnifiedWeekly = 'true'
116120 }
117121 default {
118- Write-Error "Prefix '$prefix ' is not recognized."
122+ Write-Error "Language '$lang ' is not recognized."
119123 exit 1
120124 }
121125 }
0 commit comments