Skip to content

Commit f959024

Browse files
johncblandiigoruha
andauthored
feat: remove deprecated has_downloads and ignore_vulnerability_alerts_during_read variables (#20)
* refactor: remove deprecated has_downloads and ignore_vulnerability_alerts_during_read variables has_downloads was deprecated by GitHub and previously marked deprecated in this module. ignore_vulnerability_alerts_during_read is a no-op as the provider now handles lack of permissions automatically. Both variables and all references removed from module root, examples, README, and fixtures. * style: reformat fixtures alignment after variable removal --------- Co-authored-by: Igor Rodionov <[email protected]>
1 parent 2d526a3 commit f959024

9 files changed

Lines changed: 24 additions & 66 deletions

File tree

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ module "github_repository" {
8181
has_issues = true
8282
has_projects = true
8383
has_wiki = true
84-
has_downloads = true
8584
is_template = false
8685
}
8786
```
@@ -179,13 +178,11 @@ Here is an example of using this module:
179178
| <a name="input_fork"></a> [fork](#input\_fork) | Configuration for forking an existing repository | <pre>object({<br/> source_owner = string<br/> source_repo = string<br/> })</pre> | `null` | no |
180179
| <a name="input_gitignore_template"></a> [gitignore\_template](#input\_gitignore\_template) | Gitignore template | `string` | `null` | no |
181180
| <a name="input_has_discussions"></a> [has\_discussions](#input\_has\_discussions) | Whether the repository has discussions enabled | `bool` | `false` | no |
182-
| <a name="input_has_downloads"></a> [has\_downloads](#input\_has\_downloads) | (DEPRECATED) Whether the repository has downloads enabled. This attribute is deprecated by GitHub and will be removed in a future version of this module. | `bool` | `false` | no |
183181
| <a name="input_has_issues"></a> [has\_issues](#input\_has\_issues) | Whether the repository has issues enabled | `bool` | `false` | no |
184182
| <a name="input_has_projects"></a> [has\_projects](#input\_has\_projects) | Whether the repository has projects enabled | `bool` | `false` | no |
185183
| <a name="input_has_wiki"></a> [has\_wiki](#input\_has\_wiki) | Whether the repository has wiki enabled | `bool` | `false` | no |
186184
| <a name="input_homepage_url"></a> [homepage\_url](#input\_homepage\_url) | Homepage URL of the repository | `string` | `null` | no |
187185
| <a name="input_id_length_limit"></a> [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).<br/>Set to `0` for unlimited length.<br/>Set to `null` for keep the existing setting, which defaults to `0`.<br/>Does not affect `id_full`. | `number` | `null` | no |
188-
| <a name="input_ignore_vulnerability_alerts_during_read"></a> [ignore\_vulnerability\_alerts\_during\_read](#input\_ignore\_vulnerability\_alerts\_during\_read) | Ignore vulnerability alerts during read | `bool` | `false` | no |
189186
| <a name="input_is_template"></a> [is\_template](#input\_is\_template) | Whether the repository is a template | `bool` | `false` | no |
190187
| <a name="input_label_key_case"></a> [label\_key\_case](#input\_label\_key\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.<br/>Does not affect keys of tags passed in via the `tags` input.<br/>Possible values: `lower`, `title`, `upper`.<br/>Default value: `title`. | `string` | `null` | no |
191188
| <a name="input_label_order"></a> [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.<br/>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br/>You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |

README.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ usage: |-
9595
has_issues = true
9696
has_projects = true
9797
has_wiki = true
98-
has_downloads = true
9998
is_template = false
10099
}
101100
```

examples/complete/fixtures.us-east-2.tfvars

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
owner = "cloudposse-tests"
22

3-
description = "Terraform acceptance tests"
4-
homepage_url = "http://example.com/"
5-
archived = false
6-
has_issues = true
7-
has_discussions = true
8-
has_projects = true
9-
has_wiki = true
10-
is_template = true
11-
allow_merge_commit = true
12-
merge_commit_title = "MERGE_MESSAGE"
13-
merge_commit_message = "PR_TITLE"
14-
allow_squash_merge = true
15-
squash_merge_commit_title = "COMMIT_OR_PR_TITLE"
16-
squash_merge_commit_message = "COMMIT_MESSAGES"
17-
web_commit_signoff_required = true
18-
allow_rebase_merge = true
19-
allow_auto_merge = true
20-
delete_branch_on_merge = true
21-
default_branch = "main"
22-
gitignore_template = "TeX"
23-
license_template = "GPL-3.0"
24-
auto_init = true
25-
topics = ["terraform", "github", "test"]
26-
ignore_vulnerability_alerts_during_read = true
27-
allow_update_branch = true
3+
description = "Terraform acceptance tests"
4+
homepage_url = "http://example.com/"
5+
archived = false
6+
has_issues = true
7+
has_discussions = true
8+
has_projects = true
9+
has_wiki = true
10+
is_template = true
11+
allow_merge_commit = true
12+
merge_commit_title = "MERGE_MESSAGE"
13+
merge_commit_message = "PR_TITLE"
14+
allow_squash_merge = true
15+
squash_merge_commit_title = "COMMIT_OR_PR_TITLE"
16+
squash_merge_commit_message = "COMMIT_MESSAGES"
17+
web_commit_signoff_required = true
18+
allow_rebase_merge = true
19+
allow_auto_merge = true
20+
delete_branch_on_merge = true
21+
default_branch = "main"
22+
gitignore_template = "TeX"
23+
license_template = "GPL-3.0"
24+
auto_init = true
25+
topics = ["terraform", "github", "test"]
26+
allow_update_branch = true
2827

2928
security_and_analysis = {
3029
advanced_security = false

examples/complete/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ module "example" {
4444

4545
web_commit_signoff_required = var.web_commit_signoff_required
4646

47-
ignore_vulnerability_alerts_during_read = var.ignore_vulnerability_alerts_during_read
48-
4947
autolink_references = var.autolink_references
5048
default_branch = var.default_branch
5149
enable_vulnerability_alerts = var.enable_vulnerability_alerts

examples/complete/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ variable "auto_init" {
191191
default = false
192192
}
193193

194-
variable "ignore_vulnerability_alerts_during_read" {
195-
description = "Ignore vulnerability alerts during read"
196-
type = bool
197-
default = false
198-
}
199-
200194
variable "enable_vulnerability_alerts" {
201195
description = "Enable vulnerability alerts"
202196
type = bool

examples/minimum/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ module "example" {
4343

4444
web_commit_signoff_required = var.web_commit_signoff_required
4545

46-
ignore_vulnerability_alerts_during_read = var.ignore_vulnerability_alerts_during_read
47-
4846
autolink_references = var.autolink_references
4947
default_branch = var.default_branch
5048
enable_vulnerability_alerts = var.enable_vulnerability_alerts

examples/minimum/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,6 @@ variable "auto_init" {
182182
default = false
183183
}
184184

185-
variable "ignore_vulnerability_alerts_during_read" {
186-
description = "Ignore vulnerability alerts during read"
187-
type = bool
188-
default = false
189-
}
190-
191185
variable "enable_vulnerability_alerts" {
192186
description = "Enable vulnerability alerts"
193187
type = bool

main.tf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ resource "github_repository" "default" {
5555

5656
vulnerability_alerts = var.visibility != "public" ? var.enable_vulnerability_alerts : true
5757

58-
ignore_vulnerability_alerts_during_read = var.ignore_vulnerability_alerts_during_read
59-
6058
dynamic "security_and_analysis" {
6159
for_each = var.security_and_analysis != null ? [var.security_and_analysis] : []
6260
content {
@@ -621,10 +619,3 @@ resource "github_repository_ruleset" "default" {
621619
github_repository_environment.default
622620
]
623621
}
624-
625-
check "has_downloads_deprecation" {
626-
assert {
627-
condition = var.has_downloads == false
628-
error_message = "DEPRECATION WARNING: The 'has_downloads' variable is deprecated. GitHub has removed this feature and this variable will be removed in a future version of this module. Please remove 'has_downloads' from your configuration."
629-
}
630-
}

variables.tf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ variable "has_wiki" {
7070
default = false
7171
}
7272

73-
variable "has_downloads" {
74-
description = "(DEPRECATED) Whether the repository has downloads enabled. This attribute is deprecated by GitHub and will be removed in a future version of this module."
75-
type = bool
76-
default = false
77-
}
78-
7973
variable "is_template" {
8074
description = "Whether the repository is a template"
8175
type = bool
@@ -192,12 +186,6 @@ variable "auto_init" {
192186
default = false
193187
}
194188

195-
variable "ignore_vulnerability_alerts_during_read" {
196-
description = "Ignore vulnerability alerts during read"
197-
type = bool
198-
default = false
199-
}
200-
201189
variable "enable_vulnerability_alerts" {
202190
description = "Enable vulnerability alerts"
203191
type = bool

0 commit comments

Comments
 (0)