Skip to content
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

Support branch policy merge types #300

Closed
matt-FFFFFF opened this issue Feb 9, 2021 · 0 comments · Fixed by #299
Closed

Support branch policy merge types #300

matt-FFFFFF opened this issue Feb 9, 2021 · 0 comments · Fixed by #299

Comments

@matt-FFFFFF
Copy link
Member

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

Add support for restricting the merge types available for a branch:

  • Squash
  • Rebase
  • Basic (no ff)
  • Rebase with merge

New or Affected Resource(s)

  • Resource: azuredevops_branchpolicy_merge_types

Potential Terraform Configuration

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

  enabled  = true
  blocking = true

  settings {
    allow_squash = true
    allow_rebase_and_fast_forward = true
    allow_basic_no_fast_forward = true
    allow_rebase_with_merge = true

    scope {
      repository_id  = azuredevops_git_repository.p.id
      repository_ref = "refs/heads/main"
      match_type     = "Exact"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants