diff --git a/packages/http-client-csharp/eng/pipeline/publish.yml b/packages/http-client-csharp/eng/pipeline/publish.yml index d22d0481e9d..a4228df3e92 100644 --- a/packages/http-client-csharp/eng/pipeline/publish.yml +++ b/packages/http-client-csharp/eng/pipeline/publish.yml @@ -5,8 +5,6 @@ trigger: paths: include: - packages/http-client-csharp/ - exclude: - - packages/http-client-csharp/eng/ pr: none diff --git a/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 b/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 index 9c7ee02fff4..e5fd8ac7a53 100755 --- a/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 +++ b/packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 @@ -131,6 +131,11 @@ try { Push-Location $tempDir + # Set the authentication token for gh CLI early so that scripts invoked + # during the build (e.g. Emitter_Version_Dashboard.ps1) can call the + # GitHub API to resolve commit hashes in shallow clones. + $env:GH_TOKEN = $AuthToken + # Configure git user for commits in this repository git config user.name "azure-sdk" git config user.email "azuresdk@microsoft.com" @@ -659,9 +664,6 @@ try { # Create PR using GitHub CLI Write-Host "Creating PR in $RepoOwner/$RepoName using gh CLI..." - # Set the authentication token for gh CLI - $env:GH_TOKEN = $AuthToken - # Create the PR using gh CLI $ghArgs = @("pr", "create", "--repo", "$RepoOwner/$RepoName", "--title", $PRTitle, "--body", $PRBody, "--base", $BaseBranch, "--head", $PRBranch) if ($Internal) {