From d13618dd0e3ce99cc3fd0f28f29df28371a821d9 Mon Sep 17 00:00:00 2001 From: Kerim Satirli Date: Sat, 1 Oct 2022 10:37:18 +0200 Subject: [PATCH] Docs cleanup (#31) * removes outdated `CHANGELOG.md` * cleans up example READMEs, adds ToC and removes unmaintained `usage` sections --- .release-it.json | 30 ------------ CHANGELOG.md | 28 ----------- README.md | 34 +++++++------ examples/basic/README.md | 36 +++++--------- examples/basic/main.tf | 2 +- examples/branch_protection/README.md | 62 +++++------------------ examples/branch_protection/main.tf | 25 +++++++--- examples/complex/README.md | 49 +++++-------------- examples/complex/main.tf | 10 ++-- examples/deploy_keys/README.md | 44 +++++------------ examples/deploy_keys/main.tf | 2 +- examples/files/README.md | 46 +++++------------- examples/files/main.tf | 2 +- examples/issue_labels/README.md | 52 +++++--------------- examples/issue_labels/main.tf | 2 +- examples/pages/README.md | 41 +++++----------- examples/pages/main.tf | 2 +- examples/project/README.md | 43 +++++----------- examples/project/main.tf | 2 +- examples/project_columns/README.md | 73 +++++----------------------- examples/project_columns/main.tf | 2 +- examples/template/README.md | 39 +++++---------- examples/template/main.tf | 2 +- examples/webhook/README.md | 48 +++++------------- examples/webhook/main.tf | 3 +- 25 files changed, 181 insertions(+), 498 deletions(-) delete mode 100644 .release-it.json delete mode 100644 CHANGELOG.md diff --git a/.release-it.json b/.release-it.json deleted file mode 100644 index e944009..0000000 --- a/.release-it.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "git": { - "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}", - "commit": true, - "commitArgs": ["-S"], - "commitMessage": "Release v${version}", - "requireBranch": false, - "requireCleanWorkingDir": true, - "requireCommits": true, - "requireUpstream": true, - "addUntrackedFiles": false, - "push": true, - "tag": true, - "tagAnnotation": "Release v${version}" - }, - - "github": { - "autoGenerate": true, - "draft": true, - "host": null, - "release": false, - "releaseName": "Release v${version}", - "releaseNotes": true, - "skipChecks": true, - "timeout": 0, - "web": true - }, - - "hooks": {} -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0f6427a..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -# 3.0.0 (2021-02-17) - -* updates to new version of GitHub Provider (#20) ([340bc16](https://github.com/operatehappy/terraform-github-repository/commit/340bc16d66f4b0f808f5af16abfe614f11af4cb2)) - -## 2.0.0 (2020-07-08) - -This is a major rewrite and introduces `HCL2` syntax. This version is only compatible with Terraform `0.12` and newer. - -* HCL 2.0 rebuild (#14) ([23aa3c4](https://github.com/operatehappy/terraform-github-repository/commit/23aa3c4)), closes [#14](https://github.com/operatehappy/terraform-github-repository/issues/14) -* add missed variables, replace dash in resource names by underscore (#11) ([c295101](https://github.com/operatehappy/terraform-github-repository/commit/c295101)), closes [#11](https://github.com/operatehappy/terraform-github-repository/issues/11) -* Add support for requiring review by code owner (#8) ([2d25b10](https://github.com/operatehappy/terraform-github-repository/commit/2d25b10)), closes [#8](https://github.com/operatehappy/terraform-github-repository/issues/8) - -## 0.4.0 (2017-09-24) - -* Bugfix/typecasting (#5) ([1e676f4](https://github.com/operatehappy/terraform-github-repository/commit/1e676f4)), closes [#5](https://github.com/operatehappy/terraform-github-repository/issues/5) -* empty .gitignore template and an extra note in README (#4) ([17bf68a](https://github.com/operatehappy/terraform-github-repository/commit/17bf68a)), closes [#4](https://github.com/operatehappy/terraform-github-repository/issues/4) -* ignore macOS `Icon` files (#6) ([fbc9e22](https://github.com/operatehappy/terraform-github-repository/commit/fbc9e22)), closes [#6](https://github.com/operatehappy/terraform-github-repository/issues/6) -* update Release It config to ignore non-existant package.json (#7) ([fb741dd](https://github.com/operatehappy/terraform-github-repository/commit/fb741dd)), closes [#7](https://github.com/operatehappy/terraform-github-repository/issues/7) - -## 0.3.1 (2017-09-11) - -* Bugfix/only enable team repository when toggle is set (#3) ([36e3bbd](https://github.com/operatehappy/terraform-github-repository/commit/36e3bbd)), closes [#3](https://github.com/operatehappy/terraform-github-repository/issues/3) - -## 0.3.0 (2017-09-09) - -* Feature/add module code (#1) ([db587b4](https://github.com/operatehappy/terraform-github-repository/commit/db587b4)), closes [#1](https://github.com/operatehappy/terraform-github-repository/issues/1) -* Initial commit ([2049da1](https://github.com/operatehappy/terraform-github-repository/commit/2049da1)) -* use GitHub URL in `README.md` for loading module (#2) ([632f66f](https://github.com/operatehappy/terraform-github-repository/commit/632f66f)), closes [#2](https://github.com/operatehappy/terraform-github-repository/issues/2) diff --git a/README.md b/README.md index 18b1934..de25913 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,18 @@ ## Table of Contents -- [GitHub Repository](#github-repository) - - [Table of Contents](#table-of-contents) - - [Requirements](#requirements) - - [Dependencies](#dependencies) - - [Usage](#usage) - - [Notes](#notes) - - [Author Information](#author-information) - - [License](#license) + +* [GitHub Repository](#github-repository) + * [Table of Contents](#table-of-contents) + * [Requirements](#requirements) + * [Dependencies](#dependencies) + * [Usage](#usage) + * [Inputs](#inputs) + * [Outputs](#outputs) + * [Notes](#notes) + * [Author Information](#author-information) + * [License](#license) + ## Requirements @@ -28,17 +32,17 @@ Add the module to your Terraform resources like so: ```hcl module "simple_example" { - source = "operatehappy/repository/github" + source = "ksatirli/repository/github" version = "4.0.0" - name = "oh-demo-simple-example" + name = "simple-example" visibility = false } ``` -Then, fetch the module from the [Terraform Registry](https://registry.terraform.io/modules/operatehappy/repository/github) using `terraform get`. +Then, fetch the module from the [Terraform Registry](https://registry.terraform.io/modules/ksatirli/repository/github) using `terraform get`. -Additional usage examples are available in the `examples` directory via [GitHub](https://github.com/operatehappy/terraform-github-repository/tree/main/examples). +Additional usage examples are available in the `examples` directory via [GitHub](https://github.com/ksatirli/terraform-github-repository/tree/main/examples). ### Inputs @@ -98,7 +102,7 @@ Additional usage examples are available in the `examples` directory via [GitHub] ### Upgrades from `3.0.0` to `4.x.x` As part of the updates and upgrades that were made for the `4.x.x` release, all Terraform resource identifiers were renamed from `this` to `main`. -See [`./moved.tf`](https://github.com/operatehappy/terraform-github-repository/blob/main/moved.tf) and the [Terraform documentation](https://www.terraform.io/language/modules/develop/refactoring#moved-block-syntax) for more information. +See [`./moved.tf`](https://github.com/ksatirli/terraform-github-repository/blob/main/moved.tf) and the [Terraform documentation](https://developer.hashicorp.com/terraform/language/modules/develop/refactoring#moved-block-syntax) for more information. #### Branch for GitHub Pages @@ -150,9 +154,7 @@ Replace `module.my_repository` with the Module identifier in use and replace `"m ## Author Information -This module is maintained by the contributors listed on [GitHub](https://github.com/operatehappy/terraform-github-repository/graphs/contributors). - -Development of this module was sponsored by [Operate Happy](https://github.com/operatehappy). +This module is maintained by the contributors listed on [GitHub](https://github.com/ksatirli/terraform-github-repository/graphs/contributors). ## License diff --git a/examples/basic/README.md b/examples/basic/README.md index 00022b8..12a570e 100644 --- a/examples/basic/README.md +++ b/examples/basic/README.md @@ -1,37 +1,25 @@ # Example: `basic` -> This is an example of a _basic_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _basic_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `basic`](#example-basic) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `basic`](#example--basic) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _basic_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "basic_example" { - source = "../.." - - name = "oh-demo-basic-example" - private = false -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs @@ -41,4 +29,4 @@ No inputs. ### Outputs No outputs. - \ No newline at end of file + diff --git a/examples/basic/main.tf b/examples/basic/main.tf index 5739dc3..a386639 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf @@ -5,6 +5,6 @@ provider "github" { module "basic_example" { source = "../../" - name = "oh-demo-basic-example" + name = "basic-example" visibility = "public" } diff --git a/examples/branch_protection/README.md b/examples/branch_protection/README.md index 23dc58a..f8acac3 100644 --- a/examples/branch_protection/README.md +++ b/examples/branch_protection/README.md @@ -1,63 +1,25 @@ # Example: `branch_protection` -> This is an example of a _branch-protection_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _branch-protection_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `branch_protection`](#example-branch_protection) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `branch_protection`](#example--branch_protection) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _branch-protection_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "branch_protection_example" { - source = "../../" - - name = "oh-demo-branch-protection-example" - visibility = "public" - - branch_protections = [ - { - branch = "main" - enforce_admins = true - require_signed_commits = true - - required_status_checks = { - strict = false - contexts = ["ci/sentinel"] - } - - required_pull_request_reviews = { - dismiss_stale_reviews = true - dismissal_users = ["operatehappy-bot"] - dismissal_teams = [] - require_code_owner_reviews = false, - required_approving_review_count = null - } - - restrictions = { - users = ["operatehappy-bot"] - teams = [] - } - } - ] -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules//repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs @@ -67,4 +29,4 @@ No inputs. ### Outputs No outputs. - \ No newline at end of file + diff --git a/examples/branch_protection/main.tf b/examples/branch_protection/main.tf index 62e1ad4..302fa42 100644 --- a/examples/branch_protection/main.tf +++ b/examples/branch_protection/main.tf @@ -5,7 +5,7 @@ provider "github" { module "branch_protection_example" { source = "../../" - name = "oh-demo-branch-protection-example" + name = "branch-protection-example" visibility = "public" auto_init = true @@ -16,20 +16,31 @@ module "branch_protection_example" { require_signed_commits = true required_status_checks = { - strict = false - contexts = ["ci/sentinel"] + strict = false + + contexts = [ + "ci/sentinel" + ] } required_pull_request_reviews = { - dismiss_stale_reviews = true - dismissal_users = ["ksatirli"] - dismissal_teams = [] + dismiss_stale_reviews = true + + dismissal_users = [ + "ksatirli" + ] + + dismissal_teams = [] + require_code_owner_reviews = false, required_approving_review_count = null } restrictions = { - users = ["ksatirli"] + users = [ + "ksatirli" + ] + teams = [] } } diff --git a/examples/complex/README.md b/examples/complex/README.md index c304a91..dbe6ea5 100644 --- a/examples/complex/README.md +++ b/examples/complex/README.md @@ -1,50 +1,25 @@ # Example: `complex` -> This is an example of a _complex_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _complex_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `complex`](#example-complex) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `complex`](#example--complex) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _complex_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "complex_example" { - source = "../.." - - name = "oh-demo-complex-example" - description = "Complex Repository Example" - homepage_url = "https://operatehappy.com/" - private = false - has_issues = true - has_projects = true - has_wiki = false - allow_merge_commit = false - allow_squash_merge = true - allow_rebase_merge = false - has_downloads = false - auto_init = false - default_branch = "main" - archived = false - topics = ["topic-1", "topic-2"] -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs @@ -54,4 +29,4 @@ No inputs. ### Outputs No outputs. - \ No newline at end of file + diff --git a/examples/complex/main.tf b/examples/complex/main.tf index 3b67c8b..f37ea83 100644 --- a/examples/complex/main.tf +++ b/examples/complex/main.tf @@ -5,9 +5,9 @@ provider "github" { module "complex_example" { source = "../.." - name = "oh-demo-complex-example" + name = "complex-example" description = "Complex Repository Example" - homepage_url = "https://operatehappy.com/" + homepage_url = "https://github.com/ksatirli" visibility = "private" has_issues = true has_projects = true @@ -19,5 +19,9 @@ module "complex_example" { auto_init = false default_branch = "main" archived = false - topics = ["topic-1", "topic-2"] + + topics = [ + "topic-1", + "topic-2" + ] } diff --git a/examples/deploy_keys/README.md b/examples/deploy_keys/README.md index a6a8eab..d2a66dc 100644 --- a/examples/deploy_keys/README.md +++ b/examples/deploy_keys/README.md @@ -1,45 +1,25 @@ # Example: `deploy-keys` -> This is an example of a _deploy-keys_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _deploy-keys_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `deploy-keys`](#example-deploy-keys) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `deploy-keys`](#example--deploy-keys) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _deploy-keys_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "deploy_keys_example" { - source = "../.." - - name = "oh-demo-deploy-keys-example" - private = false - - deploy_keys = [ - { - title = "Terraform-managed deploy key" - key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC52PyMU5JBZ0nWb5qjNt/nYHmT0AMHfjTaajgS7oM7puiJaT7ZGW6sO84h87RIrucNWcbfAlW3COieFqNNnXrCjQ2D2UqS0VaN7N7d+5KAwebCjYZHnViFBADZ7ed9069OSnIZNJ4WQ0Rb6M29bQAi1kq3+5zoLr6ukxYi5xFUTXMyGBp7DBOi8FuVgjoTMDHrvUvu75Q7J6kNClQq++m/OUuq4Q8i6mQRdY6psQopfxux9r2FHZK4BhYS4+5NjLb/FK2GG+sJFIkmxZnIkgX6fGsn6d9YO3HpzoKDyfHi0XmeN5TCyfbGiq/g/7FxIHwFllG3UgXJeBP1NmTt52VqTKD1ikaHXQAjfEuMVBoVb82T+1p04cUP23WSiEMQsdFFQ2jtynCXAE3j2+EMqRpAgphn2rP7nLtwwktyTUqb3QghFaKIdSGnes6MDyqFvYsQzv5TDwyyDjrR7uuVydGc2xcktr9IFVTnZsCG0DGUwbBM/0oIElC25bAvYB5EeXBMQ2MssLMAD6hoC5JOjGjn6ZcKRRiveTpXfiZmedXrjS9vzuQUIpWrjxKSkR1kreFDz4VHRvPWFRGcxU2SFv/zLewk3uwKdEx3k71D1PkyINroVDeTx4SV2HzofxlQEnw/h006TkBLZX1BoS6eoTtxEkul9qvtolhsL+7KoqHDpQ== github@example.com" - read_only = true - } - ] -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs @@ -49,4 +29,4 @@ No inputs. ### Outputs No outputs. - \ No newline at end of file + diff --git a/examples/deploy_keys/main.tf b/examples/deploy_keys/main.tf index 1ecef44..fc03c74 100644 --- a/examples/deploy_keys/main.tf +++ b/examples/deploy_keys/main.tf @@ -5,7 +5,7 @@ provider "github" { module "deploy_keys_example" { source = "../.." - name = "oh-demo-deploy-keys-example" + name = "deploy-keys-example" visibility = "public" deploy_keys = [ diff --git a/examples/files/README.md b/examples/files/README.md index 302c420..1c8d13a 100644 --- a/examples/files/README.md +++ b/examples/files/README.md @@ -1,47 +1,25 @@ # Example: `files` -> This is an example of a _files_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _files_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `files`](#example-files) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `files`](#example--files) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _files_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "files_example" { - source = "../.." - - name = "oh-demo-files-example" - private = false - - files = [ - { - file = "Adds .gitignore", - content = file("file-templates/.gitignore") - }, { - file = "Adds .gitattributes", - content = file("file-templates/.gitattributes") - } - ] -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs @@ -51,4 +29,4 @@ No inputs. ### Outputs No outputs. - \ No newline at end of file + diff --git a/examples/files/main.tf b/examples/files/main.tf index 2790d5d..61dfc6c 100644 --- a/examples/files/main.tf +++ b/examples/files/main.tf @@ -5,7 +5,7 @@ provider "github" { module "files_example" { source = "../.." - name = "oh-demo-files-example" + name = "files-example" auto_init = true visibility = "public" diff --git a/examples/issue_labels/README.md b/examples/issue_labels/README.md index 88a8937..e9a4e19 100644 --- a/examples/issue_labels/README.md +++ b/examples/issue_labels/README.md @@ -1,55 +1,25 @@ # Example: `issue-labels` -> This is an example of an _issue-labels_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of an _issue-labels_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `issue-labels`](#example-issue-labels) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `issue-labels`](#example--issue-labels) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -An _issue-labels_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "issue_labels_example" { - source = "../.." - - name = "oh-demo-issue-labels-example" - private = false - - issue_labels = [ - { - name = "size/S" - color = "0075ca" - description = "small change" - }, - { - name = "size/M" - color = "0075ca" - description = "medium change" - }, - { - name = "size/L" - color = "0075ca" - description = "medium change" - } - ] -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs diff --git a/examples/issue_labels/main.tf b/examples/issue_labels/main.tf index d4de8f5..3e65b95 100644 --- a/examples/issue_labels/main.tf +++ b/examples/issue_labels/main.tf @@ -5,7 +5,7 @@ provider "github" { module "issue_labels_example" { source = "../.." - name = "oh-demo-issue-labels-example" + name = "issue-labels-example" visibility = "public" issue_labels = [ diff --git a/examples/pages/README.md b/examples/pages/README.md index 9dd1bfe..e5325dd 100644 --- a/examples/pages/README.md +++ b/examples/pages/README.md @@ -1,44 +1,25 @@ # Example: `pages` -> This is an example of a _pages_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _pages_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `pages`](#example-pages) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `pages`](#example--pages) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _pages_ configuration of the `terraform-github-repository` Module could look like this: - -**NOTE:** A template has been used to create the repository which contains content to show simple GitHub Pages website at `https://.github.io/oh-demo-pages-example/` - -```hcl -module "pages_example" { - source = "../.." - - name = "oh-demo-pages-example" - visibility = "public" - - pages = { - branch = "main", - path = "/" - } -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs diff --git a/examples/pages/main.tf b/examples/pages/main.tf index c885c8e..08b0ab5 100644 --- a/examples/pages/main.tf +++ b/examples/pages/main.tf @@ -5,7 +5,7 @@ provider "github" { module "pages_example" { source = "../.." - name = "oh-demo-pages-example" + name = "pages-example" auto_init = true visibility = "public" diff --git a/examples/project/README.md b/examples/project/README.md index 918be42..5bd806f 100644 --- a/examples/project/README.md +++ b/examples/project/README.md @@ -1,44 +1,25 @@ # Example: `project` -> This is an example of a _project_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _project_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `project`](#example-project) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `project`](#example--project) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _project_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "project_example" { - source = "../.." - - name = "oh-demo-project-example" - private = false - - projects = [ - { - name = "Internal Infrastructure" - body = "Internal Infrastructure Project for Section 13" - } - ] -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs @@ -48,4 +29,4 @@ No inputs. ### Outputs No outputs. - \ No newline at end of file + diff --git a/examples/project/main.tf b/examples/project/main.tf index 3d4886c..a8fe685 100644 --- a/examples/project/main.tf +++ b/examples/project/main.tf @@ -5,7 +5,7 @@ provider "github" { module "project_example" { source = "../.." - name = "oh-demo-project-example" + name = "project-example" visibility = "public" has_projects = true diff --git a/examples/project_columns/README.md b/examples/project_columns/README.md index f62bebf..c29ea37 100644 --- a/examples/project_columns/README.md +++ b/examples/project_columns/README.md @@ -1,74 +1,25 @@ # Example: `project-columns` -> This is an example of a _project-columns_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _project-columns_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `project-columns`](#example-project-columns) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `project-columns`](#example--project-columns) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _project-columns_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "project_column_example" { - source = "../.." - - name = "oh-demo-project-example" - private = false - - projects = [ - { - name = "Providence Facility Infra" - body = "Infrastructure issues for the Providence Facility" - }, { - name = "Providence Facility Frontend" - body = "Frontend issues for the Providence Facility" - } - ] -} - -resource "github_project_column" "todo" { - count = length(module.project-column-example.project_ids) - - project_id = module.project-column-example.project_ids[count.index] - name = "To Do" -} - -resource "github_project_column" "in_progress" { - count = length(module.project-column-example.project_ids) - - project_id = module.project-column-example.project_ids[count.index] - name = "In Progress" -} - -resource "github_project_column" "done" { - count = length(module.project-column-example.project_ids) - - project_id = module.project-column-example.project_ids[count.index] - name = "Done" -} -``` - -[Project Columns](https://www.terraform.io/docs/providers/github/r/project_column.html) are a _child_ of [Repository Projects](https://www.terraform.io/docs/providers/github/r/repository_project.html) (as well as [Organization Projects](https://www.terraform.io/docs/providers/github/r/organization_project.html)). - -Due to the nature of the two resources - one requiring an iterator for `n` Projects and the other requiring an iterator for `n` Project Columns, there is no module built-in support for creating columns. - -In spite of that, the module output for `project_ids` is used to iterate over, with each Project Column being added as a non-module-managed resource. +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs @@ -78,4 +29,4 @@ No inputs. ### Outputs No outputs. - \ No newline at end of file + diff --git a/examples/project_columns/main.tf b/examples/project_columns/main.tf index c84217d..9fd8b17 100644 --- a/examples/project_columns/main.tf +++ b/examples/project_columns/main.tf @@ -5,7 +5,7 @@ provider "github" { module "project_column_example" { source = "../.." - name = "oh-demo-project-example" + name = "project-example" visibility = "public" has_projects = true diff --git a/examples/template/README.md b/examples/template/README.md index 92c832c..6baed01 100644 --- a/examples/template/README.md +++ b/examples/template/README.md @@ -1,42 +1,25 @@ # Example: `template` -> This is an example of a _template_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _template_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Example: `template`](#example-template) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `template`](#example--template) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _template_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "template_example" { - source = "../.." - - name = "oh-demo-template-example" - visibility = "public" - - template = { - owner = "a-demo-organization", - repository = "template-source" - } -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs diff --git a/examples/template/main.tf b/examples/template/main.tf index bf2f3d2..2fa6c51 100644 --- a/examples/template/main.tf +++ b/examples/template/main.tf @@ -5,7 +5,7 @@ provider "github" { module "template_example" { source = "../.." - name = "oh-demo-template-example" + name = "template-example" visibility = "public" template = { diff --git a/examples/webhook/README.md b/examples/webhook/README.md index 23a196a..c9e8729 100644 --- a/examples/webhook/README.md +++ b/examples/webhook/README.md @@ -1,51 +1,25 @@ # Example: `webhook` -> This is an example of a _webhook_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/operatehappy/repository/github) +> This is an example of a _webhook_ configuration of the [terraform-github-repository Module](https://registry.terraform.io/modules/ksatirli/repository/github) ## Table of Contents -- [Exexample-webhook`](#example-webhook) - - [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Usage](#usage) - - [Module Variables and Outputs](#module-variables-and-outputs) + +* [Example: `webhook`](#example--webhook) + * [Table of Contents](#table-of-contents) + * [Installation](#installation) + * [Module Variables and Outputs](#module-variables-and-outputs) + * [Inputs](#inputs) + * [Outputs](#outputs) + ## Installation -For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -## Usage - -A _webhook_ configuration of the `terraform-github-repository` Module could look like this: - -```hcl -module "webhook_example" { - source = "../.." - - name = "oh-demo-webhook-example" - visibility = "public" - - repository_webhooks = [{ - active = true - events = [ - "issues" - ] - - configuration = { - url = "https://example.com/" - content_type = "json" - secret = "AW96B6" - insecure_ssl = false - } - }] -} -``` +For a list of installation instructions, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ## Module Variables and Outputs -For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/operatehappy/repository/github) on the Terraform Registry. - -A copy of this document (as `README.md`) is also available on [GitHub](https://github.com/operatehappy/terraform-github-repository/blob/main/README.md#readme). +For a list of available variables and outputs, see the [Readme document](https://registry.terraform.io/modules/ksatirli/repository/github) on the Terraform Registry. ### Inputs diff --git a/examples/webhook/main.tf b/examples/webhook/main.tf index 4f4244b..58ce4c9 100644 --- a/examples/webhook/main.tf +++ b/examples/webhook/main.tf @@ -5,11 +5,12 @@ provider "github" { module "webhook_example" { source = "../.." - name = "oh-demo-webhook-example" + name = "webhook-example" visibility = "public" repository_webhooks = [{ active = true + events = [ "issues" ]