From f8c8af76b5b9aecab33f046808865817ded2aff6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 May 2024 15:32:32 +0000 Subject: [PATCH] docs(readme): update module usage --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 245b8b7..cd99866 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,9 @@ No modules. | [allow\_squash\_merge](#input\_allow\_squash\_merge) | To enable squash merges on the repository | `bool` | `false` | no | | [archived](#input\_archived) | Specifies if the repository should be archived | `bool` | `false` | no | | [auto\_init](#input\_auto\_init) | Disable to not produce an initial commit in the repository | `bool` | `true` | no | -| [branch\_protection](#input\_branch\_protection) | The GitHub branches to protect from forced pushes and deletion |
list(object({
branches = list(string)
enforce_admins = bool
restrict_pushes = optional(object({
blocks_creations = optional(bool)
push_allowances = optional(list(string))
}))
require_signed_commits = bool

required_checks = optional(object({
strict = bool
contexts = list(string)
}))

required_reviews = object({
dismiss_stale_reviews = bool
dismissal_restrictions = list(string)
required_approving_review_count = number
require_code_owner_reviews = bool
})
}))
| `[]` | no | +| [branches](#input\_branches) | An optional map with GitHub branches to create |
map(object({
source_branch = optional(string)
source_sha = optional(string)
use_branch_protection = optional(bool, true)

branch_protection = optional(object({
enforce_admins = optional(bool, false)
require_signed_commits = optional(bool, true)

required_checks = optional(object({
strict = optional(bool)
contexts = optional(list(string))
}))

restrict_pushes = optional(object({
blocks_creations = optional(bool)
push_allowances = optional(list(string))
}))

required_reviews = optional(object({
dismiss_stale_reviews = optional(bool, true)
dismissal_restrictions = optional(list(string))
required_approving_review_count = optional(number, 2)
require_code_owner_reviews = optional(bool, true)
}))
}), null)
}))
| `{}` | no | | [default\_branch](#input\_default\_branch) | Name of the default branch for the GitHub repository | `string` | `"main"` | no | +| [default\_branch\_protection](#input\_default\_branch\_protection) | Default branch protection settings for managed branches |
object({
enforce_admins = optional(bool, false)
require_signed_commits = optional(bool, true)

required_checks = optional(object({
strict = optional(bool)
contexts = optional(list(string))
}))

required_reviews = optional(object({
dismiss_stale_reviews = optional(bool, true)
dismissal_restrictions = optional(list(string))
required_approving_review_count = optional(number, 2)
require_code_owner_reviews = optional(bool, true)
}))

restrict_pushes = optional(object({
blocks_creations = optional(bool)
push_allowances = optional(list(string))
}))
})
|
{
"enforce_admins": false,
"require_signed_commits": true,
"required_reviews": {
"dismiss_stale_reviews": true,
"require_code_owner_reviews": true,
"required_approving_review_count": 2
}
}
| no | | [delete\_branch\_on\_merge](#input\_delete\_branch\_on\_merge) | Automatically delete head branch after a pull request is merged | `bool` | `true` | no | | [description](#input\_description) | A description for the GitHub repository | `string` | `null` | no | | [environments](#input\_environments) | An optional map with GitHub environments to configure |
map(object({
secrets = optional(map(string), {})
wait_timer = optional(number, null)

deployment_branch_policy = optional(object(
{
custom_branch_policies = optional(bool, false)
protected_branches = optional(bool, true)
}),
{
custom_branch_policies = false
protected_branches = true
}
)

reviewers = optional(object({
teams = optional(list(string))
users = optional(list(string))
}), null)

}))
| `{}` | no |