Skip to content

az repos policy required-reviewer commands do not reflect full policy input #26864

Description

@mforeman19

Related command
az repos policy required-reviewer create
az repos policy required-reviewer update

Is your feature request related to a problem? Please describe.
If I wanted to implement the following policy of adding required reviewers and not allowing those reviewers to approve themselves if they're a part of a group, I can't do that via the cli. Here's an example policy below

{
    "isEnabled": true,
    "isBlocking": true,
    "type": {
      "id": "i-dont-think-this-val-is-sensitive-but-censoring-anyway"
    },
    "settings": {
        "creatorVoteCounts": false,
        "message": "Approval is required for test repo",
        "minimumApproverCount": 1,
        "requiredReviewerIds": [
          "test-id"
        ],
        "scope": [
          {
            "matchKind": "Exact",
            "refName": "refs/heads/main",
            "repositoryId": "test-repo-id"
          }
        ]
      }
  }

I can implement that above by running say az repos policy update --id test-policy-id --config .\sample_config.json

BUT, I don't see a parameter that fulfills these settings in the documentation for the az repos policy required-reviewer commands. I see:

az repos policy required-reviewer create --blocking {false, true}
                                         --branch
                                         --enabled {false, true}
                                         --message
                                         --repository-id
                                         --required-reviewer-ids
                                         [--branch-match-type {exact, prefix}]
                                         [--detect {false, true}]
                                         [--org]
                                         [--path-filter]
                                         [--project]

Describe the solution you'd like
I'd like for there to be parameters to the above command that replicates the functionality of the reviewer policy screen:
image

I think all that's missing is that "Completion options" bit

Describe alternatives you've considered
I can implement that above by running say az repos policy update --id test-policy-id --config .\sample_config.json

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevOpsService AttentionThis issue is responsible by Azure service team.act-platform-engineering-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions