File tree 8 files changed +17
-15
lines changed
examples/public-repository
8 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
16
16
- BREAKING CHANGE: Bump minimum supported version of the GitHub provider to ` v5.16 `
17
17
as it contains a [ critical fix] ( https://github.com/integrations/terraform-provider-github/pull/1415 ) for branch protections.
18
+ - BREAKING CHANGE: Rename ` required_status_checks.contexts ` to ` required_status_checks.checks ` as contexts is
19
+ depcrecated in v3 branch protections
18
20
19
21
## [ 0.18.0]
20
22
Original file line number Diff line number Diff line change @@ -543,7 +543,7 @@ This is due to some terraform limitation and we will update the module once terr
543
543
544
544
Default is ` false ` .
545
545
546
- - [ ** ` contexts ` ** ] ( #attr-branch_protections_v3-required_status_checks-contexts ) : * (Optional ` list(string) ` )* <a name =" attr-branch_protections_v3-required_status_checks-contexts " ></a >
546
+ - [ ** ` checks ` ** ] ( #attr-branch_protections_v3-required_status_checks-checks ) : * (Optional ` list(string) ` )* <a name =" attr-branch_protections_v3-required_status_checks-checks " ></a >
547
547
548
548
The list of status checks to require in order to merge into this branch. If default is ` [] ` no status checks are required.
549
549
@@ -749,7 +749,7 @@ This is due to some terraform limitation and we will update the module once terr
749
749
750
750
Default is ` false ` .
751
751
752
- - [ ** ` contexts ` ** ] ( #attr-branch_protections_v4-required_status_checks-contexts ) : * (Optional ` list(string) ` )* <a name =" attr-branch_protections_v4-required_status_checks-contexts " ></a >
752
+ - [ ** ` checks ` ** ] ( #attr-branch_protections_v4-required_status_checks-checks ) : * (Optional ` list(string) ` )* <a name =" attr-branch_protections_v4-required_status_checks-checks " ></a >
753
753
754
754
The list of status checks to require in order to merge into this branch. If default is ` [] ` no status checks are required.
755
755
Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ section {
701
701
END
702
702
}
703
703
704
- attribute "contexts " {
704
+ attribute "checks " {
705
705
type = list (string )
706
706
default = []
707
707
description = <<- END
@@ -967,7 +967,7 @@ section {
967
967
END
968
968
}
969
969
970
- attribute "contexts " {
970
+ attribute "checks " {
971
971
type = list (string )
972
972
default = []
973
973
description = <<- END
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ module "repository" {
62
62
63
63
required_status_checks = {
64
64
strict = true
65
- contexts = ["ci/travis"]
65
+ checks = ["ci/travis"]
66
66
}
67
67
68
68
required_pull_request_reviews = {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ module "repository" {
48
48
49
49
admin_collaborators = [" terraform-test-user-1" ]
50
50
51
- branch_protections = [
51
+ branch_protections_v5 = [
52
52
{
53
53
branch = " main"
54
54
enforce_admins = true
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ locals {
56
56
for b in local . branch_protections_v3 :
57
57
length (keys (b. required_status_checks )) > 0 ? [
58
58
merge ({
59
- strict = null
60
- contexts = []
59
+ strict = null
60
+ checks = []
61
61
}, b. required_status_checks )] : []
62
62
]
63
63
@@ -260,8 +260,8 @@ resource "github_branch_protection_v3" "branch_protection" {
260
260
for_each = local. required_status_checks [count . index ]
261
261
262
262
content {
263
- strict = required_status_checks. value . strict
264
- contexts = required_status_checks. value . contexts
263
+ strict = required_status_checks. value . strict
264
+ checks = required_status_checks. value . checks
265
265
}
266
266
}
267
267
Original file line number Diff line number Diff line change @@ -119,8 +119,8 @@ module "repository" {
119
119
require_signed_commits = true
120
120
121
121
required_status_checks = {
122
- strict = true
123
- contexts = [" ci/travis" ]
122
+ strict = true
123
+ # checks = ["ci/travis"]
124
124
}
125
125
126
126
required_pull_request_reviews = {
Original file line number Diff line number Diff line change @@ -284,8 +284,8 @@ variable "branch_protections_v3" {
284
284
# enforce_admins = bool
285
285
# require_signed_commits = bool
286
286
# required_status_checks = object({
287
- # strict = bool
288
- # contexts = list(string)
287
+ # strict = bool
288
+ # checks = list(string)
289
289
# })
290
290
# required_pull_request_reviews = object({
291
291
# dismiss_stale_reviews = bool
@@ -311,7 +311,7 @@ variable "branch_protections_v3" {
311
311
#
312
312
# required_status_checks = {
313
313
# strict = false
314
- # contexts = ["ci/travis"]
314
+ # checks = ["ci/travis"]
315
315
# }
316
316
#
317
317
# required_pull_request_reviews = {
You can’t perform that action at this time.
0 commit comments