Вы можете изменить текст описания следующим образом:
Param(
[string]$vstsAccount = "software",
[string]$projectName = "project",
[string]$definitionId = "895",
[string]$keepForever = "true",
[string]$personalAccessToken = "xxxxxx"
)
# Base64-encodes the Personal Access Token (PAT)
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($personalAccessToken)")) }
# Construct the REST URL
$uri = "https://vsrm.dev.azure.com/$vstsAccount/$projectName/_apis/release/releases?api-version=5.0-preview.8"
Write-Host "Uri :" $uri
$params =
@"
{
"definitionId": $definitionId,
"description": "Create Release from PowerShell Script",
"artifacts": [],
"isDraft": false,
"reason": "VSTS Trigger",
"manualEnvironments": null,
"environmentsMetadata": null,
"properties": null,
"variables": null
}
"@
Write-Host "Request Body :" $params
# Invoke the REST call and capture the results
$result = Invoke-RestMethod -Uri $uri -Method POST -Body $params -Headers $headers -ContentType "application/json" -Verbose -Debug
Write-Host "Result :" $result
# This call should only provide a single result
if ($result.count -eq 0)
{
Write-host "Unable to locate Release Definition Id $definitionId"
}
else
{
Write-host "Successfully triggered the VSTS release job !!!"
}