azure-devops - 从 Azure DevOps REST API 获取策略配置时无法识别必需和可选审阅者
问题描述
我通过此 API 查询策略配置:https ://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/get?view=azure-devops-rest-5.0
该政策确实设置了必需和可选的审阅者组,但我无法从 REST API 返回的响应中看出:
{
"createdBy": {...},
"createdDate": "2018-11-30T04:35:02.2816989Z",
"isEnabled": true,
"isBlocking": true,
"isDeleted": false,
"settings": {
"requiredReviewerIds": "7ca7ce21-a99d-4873-aea7-ba4de2c6fc54",
"scope": ""
},
"_links": {
"self": "@{href=https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/configurations/1953}",
"policyType": "@{href=https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/types/fd2167ab-b0be-447a-8ec8-39368250530e}"
},
"revision": 1,
"id": 1953,
"url": "https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/configurations/1953",
"type": {
"id": "fd2167ab-b0be-447a-8ec8-39368250530e",
"url": "https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/types/fd2167ab-b0be-447a-8ec8-39368250530e",
"displayName": "Required reviewers"
}
},
{
"createdBy": {...},
"createdDate": "2019-01-18T09:38:32.9506909Z",
"isEnabled": true,
"isBlocking": false,
"isDeleted": false,
"settings": {
"requiredReviewerIds": "0bd7df6e-9f54-408a-bccf-25ace8912acf",
"scope": ""
},
"_links": {
"self": "@{href=https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/configurations/2101}",
"policyType": "@{href=https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/types/fd2167ab-b0be-447a-8ec8-39368250530e}"
},
"revision": 1,
"id": 2101,
"url": "https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/configurations/2101",
"type": {
"id": "fd2167ab-b0be-447a-8ec8-39368250530e",
"url": "https://dev.azure.com/myAccount/11111111-2222-3333-4444-555555555555/_apis/policy/types/fd2167ab-b0be-447a-8ec8-39368250530e",
"displayName": "Required reviewers"
}
}
我错过了什么?
解决方案
isBlocking
是确定策略是否可选的标志。
推荐阅读
- node.js - 仅使用 shell 部署应用程序
- php - 在另一个循环中保存一次复选框值
- swift - 如何在 Swift 中获取动态堆栈视图高度
- javascript - Vue.js 和 Axios:转换请求返回未定义的数据
- python - 将 tika 与 python 一起使用,运行时错误:无法启动 tika 服务器
- c++ - 我可以为不同的类型集定义模板吗?
- java - 使用 Java 将 Excel 单元格值附加到 XML
- c# - 如何使用 C# 通过电子邮件发送 HTML 内容
- rest - 在耗时的操作中处理 REST API 超时
- sql - 文本包含两个连字符时的 SQL SERVER 情况