我通过以下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"
}
}
我想念什么?
答案 0 :(得分:1)
isBlocking
是确定策略是否可选的标志。