From 594af5cb8e94e41475726689b8d80c28560b751d Mon Sep 17 00:00:00 2001 From: hminaee-tc Date: Thu, 29 May 2025 12:34:59 -0300 Subject: [PATCH 1/2] feat/IDP-30: add documentation --- website/docs/r/repository.html.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/website/docs/r/repository.html.markdown b/website/docs/r/repository.html.markdown index dc18add1d6..e091a64479 100644 --- a/website/docs/r/repository.html.markdown +++ b/website/docs/r/repository.html.markdown @@ -47,6 +47,18 @@ resource "github_repository" "example" { } ``` +## Example Usage with Repository Forking + +```hcl +resource "github_repository" "forked_repo" { + name = "forked-repository" + description = "This is a fork of another repository" + fork = true + source_owner = "some-org" + source_repo = "original-repository" +} +``` + ## Argument Reference The following arguments are supported: @@ -57,6 +69,12 @@ The following arguments are supported: * `homepage_url` - (Optional) URL of a page describing the project. +* `fork` - (Optional) Set to `true` to create a fork of another repository. When set to `true`, `source_owner` and `source_repo` must be specified. + +* `source_owner` - (Optional) The owner of the repository to fork. Required when `fork` is `true`. + +* `source_repo` - (Optional) The name of the repository to fork. Required when `fork` is `true`. + * `private` - (Optional) Set to `true` to create a private repository. Repositories are created as public (e.g. open source) by default. From 930c0b7012b6eca9ce75fdebc9de64881bd0d544 Mon Sep 17 00:00:00 2001 From: hminaee-tc Date: Thu, 29 May 2025 15:00:22 -0300 Subject: [PATCH 2/2] feat/IDP-30: address feedback --- website/docs/r/repository.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/repository.html.markdown b/website/docs/r/repository.html.markdown index e091a64479..e9ec145d20 100644 --- a/website/docs/r/repository.html.markdown +++ b/website/docs/r/repository.html.markdown @@ -69,9 +69,9 @@ The following arguments are supported: * `homepage_url` - (Optional) URL of a page describing the project. -* `fork` - (Optional) Set to `true` to create a fork of another repository. When set to `true`, `source_owner` and `source_repo` must be specified. +* `fork` - (Optional) Set to `true` to create a fork of an existing repository. When set to `true`, both `source_owner` and `source_repo` must also be specified. -* `source_owner` - (Optional) The owner of the repository to fork. Required when `fork` is `true`. +* `source_owner` - (Optional) The GitHub username or organization that owns the repository being forked. Required when `fork` is `true`. * `source_repo` - (Optional) The name of the repository to fork. Required when `fork` is `true`.