azure - 如何在不使用线程的情况下在拉取请求中创建评论
问题描述
我有一个脚本将线程发布到拉取请求中:
$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 调用来做到这一点?
解决方案
推荐阅读
- php - 如何每 24 小时从 .txt 文件中获取字符串?
- python - 尝试使用 Peewee (python) 连接到 Microsoft SQL 数据库
- shell - 如何将文本文件中的参数逐行传递给包含在字符串中的命令
- apache-kafka - 重新平衡分区时 Apache Kafka 代理的 OOM
- networking - 无法从 WSL2 访问网络
- mysql - SQL Groupby -- 自定义聚合函数:最大值减去每个组中不同的值
- xml - 如何在 XSLT-1.0 中连接 XML 标签?
- docker - 在 Dockerfile 和 docker-compose 中编码什么来传递本地包
- json - 来自 react-native 的帖子
- android - 添加 Firebase 存储分区