我有一个脚本,该脚本将线程发布到拉取请求中:
$createThreadInPRUrl = "https://dev.azure.com/$organization/$project/_apis/git/repositories/$repositoryId/pullRequests/$pullRequestId/threads?api-version=5.0"
Invoke-RestMethod -Uri $createThreadInPRUrl -Headers @{Authorization = $pat } -Body $body -Method Post -ContentType 'application/json'
$body = @"
{
"comments": [
{
"content": "
\nLink to feature release $env:featureReleaseUrl\nOne or more Cypress tests failed.\nLink to Cypress test results $cypressResultatenUrl",
"CommentThreadStatus": "closed"
}
]
}
"@
这很好用:
但是我不想使用线程。我想创建类似提交更新的内容:
我可以使用哪个API调用来做到这一点?