-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azuredevops additional branch policy settings in the terraform provider #255
azuredevops additional branch policy settings in the terraform provider #255
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@billbirchatcoles azuredevops_branch_policy_auto_reviewers
document not updated.
settings := fmt.Sprintf( | ||
` | ||
reviewer_count = %d | ||
submitter_can_vote = %t | ||
`, reviewers, submitterCanVote, | ||
allow_completion_with_rejects_or_waits = %t | ||
last_pusher_cannot_approve = %t | ||
on_last_iteration_require_vote = %t | ||
on_push_reset_all_votes = %t | ||
on_push_reset_approved_votes = %t | ||
`, reviewers, flag, flag, flag, flag, flag, flag, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since flag
was duplicate for 6 times, suggest change to
settings := fmt.Sprintf(
`
reviewer_count = %[1]d
submitter_can_vote = %[2]t
allow_completion_with_rejects_or_waits = %[2]t
last_pusher_cannot_approve = %[2]t
on_last_iteration_require_vote = %[2]t
on_push_reset_all_votes = %[2]t
on_push_reset_approved_votes = %[2]t
`, reviewers, flag,
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
OnLastIterationRequireVote bool `json:"requireVoteOnLastIteration" tf:"on_last_iteration_require_vote"` | ||
OnPushResetAllVotes bool `json:"resetRejectionsOnSourcePush" tf:"on_push_reset_all_votes"` | ||
LastPusherCannotVote bool `json:"blockLastPusherVote" tf:"last_pusher_cannot_approve"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one of on_push_reset_approved_votes
and on_push_reset_all_votes
can be set to true
at the same time. If set them all to true
, on_push_reset_all_votes
will eventually take effect. Can we add some checks and block the wrong configurations before send request to service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…`on_push_reset_approved_votes` are true microsoft#206 MADM-312
…ops-additional-branch-policy-settings-in-the-terraform-provider
Merged in latest master (3bd4c54). Retested. |
…ops-additional-branch-policy-settings-in-the-terraform-provider
Merged in latest master (76e37e7). |
Azdo build failed with
|
Maybe the min-reviewers test has deleted the '[email protected]' account but that is a wild guess. I can't see the test data... |
Sometimes the tests is unstable, re-run can handle this. |
LGTM |
This PR is to add new kinds of permissions to the branch policies.
submitter_can_vote
- (Optional) Allow requestors to approve their own changes. Defaults tofalse
.last_pusher_cannot_approve
(Optional) Prohibit the most recent pusher from approving their own changes. Defaults tofalse
.allow_completion_with_rejects_or_waits
(Optional) Allow completion even if some reviewers vote to wait or reject. Defaults tofalse
.on_push_reset_approved_votes
(Optional) When new changes are pushed reset all approval votes (does not reset votes to reject or wait). Defaults tofalse
.on_push_reset_all_votes
(Optional) When new changes are pushed reset all code reviewer votes. Defaults tofalse
.on_last_iteration_require_vote
(Optional) On last iteration require vote. Defaults tofalse
.All Submissions:
What about the current behavior has changed?
No changes
Issue Number: #206
Does this introduce a change to
go.mod
,go.sum
orvendor/
?Does this introduce a breaking change?
Any relevant logs, error output, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Other information