diff --git a/terraform/github/branch_protection.tf b/terraform/github/branch_protection.tf index 0d594bf..0cd5a2d 100644 --- a/terraform/github/branch_protection.tf +++ b/terraform/github/branch_protection.tf @@ -1,6 +1,6 @@ resource "github_branch_protection" "hackathon_master" { - repository = "hackathon" - branch = "master" + repository_id = "hackathon" + pattern = "master" enforce_admins = false required_status_checks {} @@ -9,33 +9,31 @@ resource "github_branch_protection" "hackathon_master" { dismiss_stale_reviews = false } - restrictions { - teams = ["imas_hack"] - } + push_restrictions = [ + "imas_hack" + ] } resource "github_branch_protection" "mastodon_imastodon" { - repository = "mastodon" - branch = "imastodon" + repository_id = "mastodon" + pattern = "imastodon" enforce_admins = false required_status_checks { strict = false contexts = [ - "ci/circleci: test-ruby2.6", + "ci/circleci: test-ruby2.6", ] } required_pull_request_reviews { dismiss_stale_reviews = false } - - restrictions {} } resource "github_branch_protection" "imasparql_master" { - repository = "imasparql" - branch = "master" + repository_id = "imasparql" + pattern = "master" enforce_admins = false required_status_checks { @@ -48,6 +46,4 @@ resource "github_branch_protection" "imasparql_master" { require_code_owner_reviews = true required_approving_review_count = 1 } - - restrictions {} }