Sync eng/common directory with azure-sdk-tools for PR 11741 (#6706)

* Add a pipeline template to mark SDK package as released
This commit is contained in:
Azure SDK Bot 2025-08-20 13:56:29 -07:00 committed by GitHub
parent 800b05fc30
commit 9c2426e2da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
parameters:
ConfigFileDir: ''
PackageArtifactName: ''
steps:
- task: AzureCLI@2
inputs:
azureSubscription: opensource-api-connection
scriptType: pscore
scriptLocation: scriptPath
scriptPath: $(Build.SourcesDirectory)/eng/common/scripts/Mark-ReleasePlanCompletion.ps1
arguments: -PackageInfoFilePath '${{ parameters.ConfigFileDir }}/${{ parameters.PackageArtifactName }}.json'
workingDirectory: $(Pipeline.Workspace)
displayName: Mark package as released
continueOnError: true
condition: and(succeeded(), ne(variables['Skip.MarkReleaseCompletion'], 'true'))

View File

@ -1052,6 +1052,7 @@ function Get-ReleasePlanForPackage($packageName)
$query = "SELECT ${fieldList} FROM WorkItems WHERE [Work Item Type] = 'Release Plan' AND [${packageNameFieldName}] = '${packageName}'"
$query += " AND [${prStatusFieldName}] = 'merged'"
$query += " AND [System.State] IN ('In Progress') ORDER BY [System.CreatedDate]"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
$workItems = Invoke-Query $fields $query
return $workItems
}