问题描述
我正在尝试使用 Git Azure API 创建 PR
Azure git api documentation
根据作为请求正文一部分的文档,您有一个字段:Vote 具有以下值:
Vote on a pull request:
10 - approved 5 - approved with suggestions 0 - no Vote -5 - waiting for author -10 - rejected
我试图通过 10,但 PR 已创建但未获批准。
即使我遇到冲突,我也想批准 PR。
知道我在这里遗漏了什么吗?
解决方法
请求网址
PUT https://dev.azure.com/{Org name}/{Project name}/_apis/git/repositories/{repo name}/pullRequests/{pull request ID}/reviewers/{reviewerId}?api-version=6.0
请求正文:
{
"hasDeclined": false,"id": "{reviewerId}","vote": 10
}
结果:
邮递员

界面:
