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
@@ -19,6 +19,7 @@ module "repository" {
name = each.value.name
organisation = each.value.organisation
fork_from = each.value.fork_from
description = each.value.description
private = each.value.private
default_branch = each.value.default_branch