Add fork_from to repository config
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful

Express a fork as an optional fork_from key on the repository yaml, so a
forked repo is declared the same way as any other repo.

- add fork_from "<owner>/<repo>" to the repository module and object type
- create gitea_fork instead of gitea_repository when fork_from is set
- validate the source repo name matches the config file name, since a fork
  inherits the source name
- move gitea_repository.this to index 0 for the count refactor
- index existing repository import targets to match
This commit is contained in:
2026-09-19 15:55:12 +10:00
parent 66823a939a
commit 9ab540719e
6 changed files with 72 additions and 35 deletions
+1
View File
@@ -17,6 +17,7 @@ variable "repository" {
type = map(object({
name = string
organisation = string
fork_from = optional(string)
description = optional(string)
private = optional(bool)
default_branch = optional(string)