不能识别从Azure中的DevOps REST API获取策略配置时的必需和可选评审

问题描述 投票:0回答:1

我查询的策略配置在这个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"
    }
}

我错过了什么?

azure-devops azure-devops-rest-api
1个回答
1
投票

isBlocking是确定的政策是可选的还是没有该标志。

© www.soinside.com 2019 - 2024. All rights reserved.