Terraform-provider-azuredevops: Branch Policy Minimum Reviewers Additional Settings

Created on 16 Oct 2020  ·  6Comments  ·  Source: microsoft/terraform-provider-azuredevops

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

We want to add more settings to the Minimum Reviewers resource. From the REST API they are:

            "allowDownvotes"
            "resetOnSourcePush"
            "requireVoteOnLastIteration"
            "resetRejectionsOnSourcePush"
            "blockLastPusherVote"

New or Affected Resource(s)

  • azuredevops_branch_policy_min_reviewers

Potential Terraform Configuration

resource "azuredevops_branch_policy_min_reviewers" "p" {
  project_id = azuredevops_project.p.id

settings {
  last_pusher_cannot_approve = true
  allow_completion_with_rejects_or_waits = true
  on_push_reset_approved_votes = true
  on_push_reset_all_votes = true
  on_last_iteration_require_vote = true
}

References

Example Settings from the API (since settings are not documented):

        {
            "createdBy": {
                "displayName": "Bill Birch",
                "url": "https://spsprodeau1.vssps.visualstudio.com/redactedredacted"
                "_links": {
                    "avatar": {
                        "href": "https://dev.azure.com/billbirchredactedredacted"
                    }
                },
                "id": "redacted-redacted",
                "uniqueName": "[email protected]",
                "imageUrl": "https://dev.azure.com/billbirch/redactedredacted",
                "descriptor": "redactedredacted"
            },
            "createdDate": "2020-10-15T08:21:46.5683546Z",
            "isEnabled": true,
            "isBlocking": true,
            "isDeleted": false,
            "settings": {
                "minimumApproverCount": 10,
                "creatorVoteCounts": true,
                "allowDownvotes": true,
                "resetOnSourcePush": true,
                "requireVoteOnLastIteration": false,
                "resetRejectionsOnSourcePush": false,
                "blockLastPusherVote": true,
                "scope": [
                    {
                        "refName": "refs/heads/master",
                        "matchKind": "Exact",
                        "repositoryId": null
                    }
                ]
            },
            "isEnterpriseManaged": false,
            "_links": {
                "self": {
                    "href": "https://dev.azure.com/billbirch/redactedredacted/_apis/policy/configurations/11"
                },
                "policyType": {
                    "href": "https://dev.azure.com/billbirch/redactedredacted/_apis/policy/types/fa4e907d-c16b-4a4c-9dfa-4906e5d171dd"
                }
            },
            "revision": 12,
            "id": 11,
            "url": "https://dev.azure.com/billbirch/redactedredacted/_apis/policy/configurations/11",
            "type": {
                "id": "fa4e907d-c16b-4a4c-9dfa-4906e5d171dd",
                "url": "https://dev.azure.com/billbirch/redactedredacted/_apis/policy/types/fa4e907d-c16b-4a4c-9dfa-4906e5d171dd",
                "displayName": "Minimum number of reviewers"
            }
        }

```

enhancement

Most helpful comment

Hi,

please see PR #255.

Regards,
Bill

On Tue, 15 Dec 2020, 1:49 pm Nandan Mathure, notifications@github.com
wrote:

Are you still working on this feature? I need it for my integration.
Please let me know how can I contribute to the work you have already
started.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/terraform-provider-azuredevops/issues/206#issuecomment-745016913,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALFRXYWWK7S3H5JDFMQ7ZDSU3FCXANCNFSM4SSYR3PA
.

All 6 comments

I have started working on this one. Our Fork is here: https://github.com/colesgroup/terraform-provider-azuredevops

Are you still working on this feature? I need it for my integration. Please let me know how can I contribute to the work you have already started.

Yes, I have to push up a PR today

Bill

On Tue, 15 Dec 2020, 1:49 pm Nandan Mathure, notifications@github.com
wrote:

Are you still working on this feature? I need it for my integration.
Please let me know how can I contribute to the work you have already
started.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/terraform-provider-azuredevops/issues/206#issuecomment-745016913,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALFRXYWWK7S3H5JDFMQ7ZDSU3FCXANCNFSM4SSYR3PA
.

I'll push to our fork and let you know.

On Tue, 15 Dec 2020, 1:49 pm Nandan Mathure, notifications@github.com
wrote:

Are you still working on this feature? I need it for my integration.
Please let me know how can I contribute to the work you have already
started.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/terraform-provider-azuredevops/issues/206#issuecomment-745016913,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALFRXYWWK7S3H5JDFMQ7ZDSU3FCXANCNFSM4SSYR3PA
.

Hi,

please see PR #255.

Regards,
Bill

On Tue, 15 Dec 2020, 1:49 pm Nandan Mathure, notifications@github.com
wrote:

Are you still working on this feature? I need it for my integration.
Please let me know how can I contribute to the work you have already
started.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/terraform-provider-azuredevops/issues/206#issuecomment-745016913,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALFRXYWWK7S3H5JDFMQ7ZDSU3FCXANCNFSM4SSYR3PA
.

Close this issue , feature request has been implemented and merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EliiseS picture EliiseS  ·  9Comments

EliiseS picture EliiseS  ·  8Comments

josh-barker picture josh-barker  ·  4Comments

patr00n picture patr00n  ·  3Comments

julie-ng picture julie-ng  ·  4Comments