Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/private_repository/repository.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module "repository_base" {
protected_branches = var.protected_branches
delete_head_on_merge = var.delete_head_on_merge
allow_auto_merge = var.allow_auto_merge
requires_web_commit_signing = var.requires_web_commit_signing

secret_scanning = true
secret_scanning_on_push = true
Expand Down
8 changes: 7 additions & 1 deletion modules/private_repository/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ variable "allow_auto_merge" {
default = true
}

variable "requires_web_commit_signing" {
description = "If set commit signatures are required for commits to the organization. Defaults to `false`."
type = bool
default = false
}

variable "dependabot_security_updates" {
description = "Enables dependabot security updates. Only works when `has_vulnerability_alerts` is set because that is required to enable dependabot for the repository."
type = bool
Expand Down Expand Up @@ -188,4 +194,4 @@ variable "rulesets" {
enforcement = string
}))
default = {}
}
}
3 changes: 2 additions & 1 deletion modules/public_repository/repository.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module "repository_base" {
protected_branches = var.protected_branches
delete_head_on_merge = var.delete_head_on_merge
allow_auto_merge = var.allow_auto_merge
requires_web_commit_signing = var.requires_web_commit_signing

secret_scanning = true
secret_scanning_on_push = true
Expand All @@ -35,4 +36,4 @@ module "repository_base" {
license_template = var.license_template

rulesets = var.rulesets
}
}
8 changes: 7 additions & 1 deletion modules/public_repository/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ variable "allow_auto_merge" {
default = true
}

variable "requires_web_commit_signing" {
description = "If set commit signatures are required for commits to the organization. Defaults to `false`."
type = bool
default = false
}

variable "dependabot_security_updates" {
description = "Enables dependabot security updates. Only works when `has_vulnerability_alerts` is set because that is required to enable dependabot for the repository."
type = bool
Expand Down Expand Up @@ -188,4 +194,4 @@ variable "rulesets" {
enforcement = string
}))
default = {}
}
}
1 change: 1 addition & 0 deletions modules/repository_base/repository.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "github_repository" "repository" {
homepage_url = var.homepage
delete_branch_on_merge = var.delete_head_on_merge
allow_auto_merge = var.allow_auto_merge
web_commit_signoff_required = var.requires_web_commit_signing
license_template = var.license_template


Expand Down
8 changes: 7 additions & 1 deletion modules/repository_base/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ variable "allow_auto_merge" {
default = true
}

variable "requires_web_commit_signing" {
description = "If set commit signatures are required for commits to the organization. Defaults to `false`."
type = bool
default = false
}

variable "visibility" {
description = "Sets the visibility property of a repository. Defaults to \"private\""
type = string
Expand Down Expand Up @@ -242,4 +248,4 @@ variable "rulesets" {
enforcement = string
}))
default = {}
}
}
3 changes: 2 additions & 1 deletion modules/repository_set/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ variable "private_repositories" {
homepage = string
delete_head_on_merge = bool
allow_auto_merge = bool
requires_web_commit_signing = bool
dependabot_security_updates = bool
organization_action_secrets = optional(list(string))
organization_codespace_secrets = optional(list(string))
Expand Down Expand Up @@ -151,4 +152,4 @@ variable "rulesets" {
repositories = list(string)
}))
default = {}
}
}