Skip to content

Commit 522845b

Browse files
gaima8rsmets
andauthored
feat(rsmets): include_all_branches from template (#19)
Implements mineiros-io#172 --------- Co-authored-by: Ray Smets <rayjsmets@gmail.com>
1 parent 4274008 commit 522845b

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ See [variables.tf] and [examples/] for details and use-cases.
182182
| <a name="input_security_and_analysis"></a> [security\_and\_analysis](#input\_security\_and\_analysis) | (Optional) Security and analysis configuration for the repository.<br/><br/>- All fields except org\_advanced\_security are strings: "enabled" or "disabled".<br/>- org\_advanced\_security is a bool indicating whether the org has split licensing for Advanced Security. | <pre>object({<br/> org_advanced_security = optional(bool, false)<br/> advanced_security = optional(string, "disabled")<br/> code_security = optional(string, "disabled")<br/> secret_scanning = optional(string, "disabled")<br/> secret_scanning_push_protection = optional(string, "disabled")<br/> secret_scanning_ai_detection = optional(string, "disabled")<br/> secret_scanning_non_provider_patterns = optional(string, "disabled")<br/> })</pre> | `null` | no |
183183
| <a name="input_squash_merge_commit_message"></a> [squash\_merge\_commit\_message](#input\_squash\_merge\_commit\_message) | (Optional) Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. | `string` | `"COMMIT_MESSAGES"` | no |
184184
| <a name="input_squash_merge_commit_title"></a> [squash\_merge\_commit\_title](#input\_squash\_merge\_commit\_title) | (Optional) Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. | `string` | `"COMMIT_OR_PR_TITLE"` | no |
185-
| <a name="input_template"></a> [template](#input\_template) | (Optional) Template repository to use. (Default: {}) | <pre>object({<br/> owner = string<br/> repository = string<br/> })</pre> | `null` | no |
185+
| <a name="input_template"></a> [template](#input\_template) | (Optional) Template repository to use. (Default: {}) | <pre>object({<br/> owner = string<br/> repository = string<br/> include_all_branches = optional(bool, false)<br/> })</pre> | `null` | no |
186186
| <a name="input_topics"></a> [topics](#input\_topics) | (Optional) The list of topics of the repository. (Default: []) | `list(string)` | `null` | no |
187187
| <a name="input_triage_collaborators"></a> [triage\_collaborators](#input\_triage\_collaborators) | (Optional) A list of users to add as collaborators granting them triage permission. | `list(string)` | `[]` | no |
188188
| <a name="input_triage_team_ids"></a> [triage\_team\_ids](#input\_triage\_team\_ids) | (Optional) A list of teams (by id) to grant triage permission to. | `list(string)` | `[]` | no |

main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ resource "github_repository" "repository" {
131131
for_each = local.template
132132

133133
content {
134-
owner = template.value.owner
135-
repository = template.value.repository
134+
owner = template.value.owner
135+
repository = template.value.repository
136+
include_all_branches = template.value.include_all_branches
136137
}
137138
}
138139

variables.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ variable "extra_topics" {
194194
variable "template" {
195195
description = "(Optional) Template repository to use. (Default: {})"
196196
type = object({
197-
owner = string
198-
repository = string
197+
owner = string
198+
repository = string
199+
include_all_branches = optional(bool, false)
199200
})
200201
default = null
201202
}

0 commit comments

Comments
 (0)