Skip to content

Commit

Permalink
Upgrade to 6.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlovic-ivan committed Jan 21, 2025
1 parent ee6001a commit 9a1217a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ resource "github_branch_protection" "branch_protection" {

allows_deletions = try(var.branch_protections_v4[each.value].allows_deletions, false)
allows_force_pushes = try(var.branch_protections_v4[each.value].allows_force_pushes, false)
blocks_creations = try(var.branch_protections_v4[each.value].blocks_creations, false)
enforce_admins = try(var.branch_protections_v4[each.value].enforce_admins, true)
push_restrictions = try(var.branch_protections_v4[each.value].push_restrictions, [])
# push_restrictions = try(var.branch_protections_v4[each.value].push_restrictions, []) this is now renamed to push allowances
require_conversation_resolution = try(var.branch_protections_v4[each.value].require_conversation_resolution, false)
require_signed_commits = try(var.branch_protections_v4[each.value].require_signed_commits, false)
required_linear_history = try(var.branch_protections_v4[each.value].required_linear_history, false)
Expand All @@ -230,6 +229,14 @@ resource "github_branch_protection" "branch_protection" {
contexts = try(required_status_checks.value.contexts, [])
}
}

dynamic "restrict_pushes" {
for_each = try([each.value], {})
content {
blocks_creations = try(restrict_pushes.blocks_creations, false)
push_allowances = try(restrict_pushes.push_restrictions, [])
}
}
}

# ---------------------------------------------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ terraform {
required_providers {
github = {
source = "integrations/github"
version = ">= 4.20, < 6.0"
# version = ">= 4.20, < 6.0"
version = "6.5.0"
}
}
}

0 comments on commit 9a1217a

Please sign in to comment.