Merge remote-tracking branch 'origin/main' into benvin/iuclabs-autocraft

This commit is contained in:
2026-11-19 22:50:16 +11:00
16 changed files with 33 additions and 8 deletions
+4 -1
View File
@@ -34,7 +34,7 @@ members: []
```yaml
description: ""
private: true
private: null # null = private; must be omitted with fork_from
default_branch: main
maintainers: [] # users or @team: maintain access, seed initial .github/CODEOWNERS
codeowners: [] # push access
@@ -42,8 +42,11 @@ merge_type: squash # squash | merge | rebase
delete_branch_on_merge: true
rulesets: [] # opt-in rulesets from ruleset/
exclude_rulesets: [] # opt out of non-mandatory all_repos rulesets
fork_from: null # owner/repo: fork a public upstream (see below)
```
`fork_from: owner/repo` creates the repository as a fork of a public upstream. Visibility follows the source, so `private` must be omitted. `default_branch` must match the upstream default branch. `fork_from` only works when creating a new repository: the old one is archived on destroy and keeps the name, so to convert an existing repository delete it on GitHub (or `terragrunt state rm` its repository resources) first.
`ruleset/<name>.yaml`:
```yaml
@@ -2,6 +2,7 @@ description: "Shared Go library for estate services: postgres, http service kit,
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
@@ -1,6 +1,7 @@
description: "Terraform provider for managing ArtifactAPI"
private: false
default_delete_branch_after_merge: true
archived: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
@@ -2,6 +2,7 @@ description: "Terraform provider for encapi: manage Puppet ENC roles, statuses,
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
@@ -2,6 +2,7 @@ description: "Terraform provider for the Vault/OpenBao Gitea token secrets engin
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
@@ -2,6 +2,7 @@ description: "Terraform provider for the Vault/OpenBao GPG/OpenPGP secrets engin
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
@@ -2,6 +2,7 @@ description: "Terraform provider for the kea-operator KeaAPI: manage Kea DHCP su
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
@@ -2,6 +2,7 @@ description: "Terraform provider for the Vault/OpenBao LiteLLM dynamic secrets e
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
@@ -2,6 +2,7 @@ description: "Terraform provider for the Vault/OpenBao Rancher token secrets eng
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
@@ -2,6 +2,7 @@ description: "Terraform provider to manage the arrstack Vault secrets engine (co
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
@@ -2,6 +2,7 @@ description: "Terraform provider for the Vault/OpenBao NetBox token secrets engi
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
@@ -2,6 +2,7 @@ description: "HashiCorp Vault / OpenBao secrets engine issuing short-lived signe
private: false
default_branch: "main"
default_delete_branch_after_merge: true
archived: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
@@ -1,4 +1,4 @@
description: "Terraform provider for the Vault/OpenBao ghp token secrets engine (vault-secrets-ghp)"
description: "Terraform provider for the Vault/OpenBao goodtune/ghp token secrets engine (vault-secrets-ghp)"
private: true
maintainers:
- "@maintainers"
@@ -1,4 +1,4 @@
description: "HashiCorp Vault / OpenBao secrets engine for ghp: mints ephemeral, scoped access tokens via the ghp admin API, authenticating as a static admin service token"
description: "HashiCorp Vault / OpenBao secrets engine for goodtune/ghp: mints ephemeral, scoped access tokens via the ghp admin API, authenticating as a static admin service token"
private: true
maintainers:
- "@maintainers"
+12 -1
View File
@@ -119,7 +119,6 @@ run "fork_from_source" {
autocraft = { name = "autocraft", fork_from = "storytold/autocraft", maintainers = ["@maintainers"] }
plain = { name = "plain" }
secret = { name = "secret", maintainers = ["@maintainers"] }
public = { name = "public", private = false, fork_from = "storytold/public" }
}
}
@@ -176,6 +175,18 @@ run "private_fork_rejected" {
expect_failures = [var.repository]
}
run "public_fork_rejected" {
command = plan
variables {
repository = {
bad = { name = "bad", fork_from = "storytold/autocraft", private = false }
}
}
expect_failures = [var.repository]
}
run "invalid_fork_from_rejected" {
command = plan
+4 -4
View File
@@ -96,7 +96,7 @@ variable "ruleset" {
}
variable "repository" {
description = "Map of repositories to create, keyed by name"
description = "Map of repositories to create, keyed by name; fork_from (owner/repo) forks a public upstream and requires private to be omitted"
type = map(object({
name = string
description = optional(string, "")
@@ -114,12 +114,12 @@ variable "repository" {
validation {
condition = alltrue([for repo in var.repository : repo.fork_from == null || can(regex("^[^/]+/[^/]+$", repo.fork_from))])
error_message = "fork_from must be \"<owner>/<repo>\": ${join(", ", [for name, repo in var.repository : name if repo.fork_from != null && !can(regex("^[^/]+/[^/]+$", coalesce(repo.fork_from, "-")))])}."
error_message = "fork_from must be \"<owner>/<repo>\" of a public upstream: ${join(", ", [for name, repo in var.repository : name if repo.fork_from != null && !can(regex("^[^/]+/[^/]+$", coalesce(repo.fork_from, "-")))])}."
}
validation {
condition = alltrue([for repo in var.repository : !(repo.fork_from != null && repo.private == true)])
error_message = "private cannot be set on a fork, its visibility follows the source: ${join(", ", [for name, repo in var.repository : name if repo.fork_from != null && repo.private == true])}."
condition = alltrue([for repo in var.repository : repo.fork_from == null || repo.private == null])
error_message = "private cannot be set on a fork, its visibility follows the source and only public upstreams can be forked: ${join(", ", [for name, repo in var.repository : name if repo.fork_from != null && repo.private != null])}."
}
validation {